X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/4dae2117bd399c1076973d325c6425e79fda1220..da2ddd3f782202bed965830379672079547846ff:/apps/api/handlers/library_handlers.py diff --git a/apps/api/handlers/library_handlers.py b/apps/api/handlers/library_handlers.py index 4435fe96..d7438a18 100644 --- a/apps/api/handlers/library_handlers.py +++ b/apps/api/handlers/library_handlers.py @@ -216,7 +216,7 @@ class DocumentHTMLHandler(BaseHandler): allowed_methods = ('GET') @hglibrary - def read(self, request, docid, lib): + def read(self, request, docid, lib, stylesheet='partial'): """Read document as html text""" try: revision = request.GET.get('revision', 'latest') @@ -231,7 +231,7 @@ class DocumentHTMLHandler(BaseHandler): 'message': 'Provided revision refers, to document "%s", but provided "%s"' % (document.id, docid) }) return librarian.html.transform(document.data('xml'), is_file=False, \ - parse_dublincore=False, stylesheet="partial",\ + parse_dublincore=False, stylesheet=stylesheet,\ options={ "with-paths": 'boolean(1)', }) @@ -551,7 +551,7 @@ class MergeHandler(BaseHandler): # User is not permitted to make a merge, right away # So we instead create a pull request in the database try: - prq, created = PullRequest.get_or_create( + prq, created = PullRequest.objects.get_or_create( source_revision = str(udoc.revision), defaults = { 'comitter': request.user,