From: Ɓukasz Rekucki Date: Mon, 28 Sep 2009 14:20:26 +0000 (+0200) Subject: Fixed text update. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/b9bce2dc718a9146a202057e4bb1809927d9caf6?ds=sidebyside;hp=-c Fixed text update. --- b9bce2dc718a9146a202057e4bb1809927d9caf6 diff --git a/apps/api/handlers/library_handlers.py b/apps/api/handlers/library_handlers.py index c5666dd0..64b95c2d 100644 --- a/apps/api/handlers/library_handlers.py +++ b/apps/api/handlers/library_handlers.py @@ -284,14 +284,14 @@ class DocumentTextHandler(BaseHandler): try: # return the new revision number - return { + return response.SuccessAllOk.django_response({ "document": ndoc.id, "subview": "xml", "previous_revision": current.revision, "updated_revision": ndoc.revision - } + }) except Exception, e: - lib._rollback() + if ndoc: lib._rollback() raise e except RevisionNotFound, e: return response.EntityNotFound().django_response(e)