- return {
- "document": ndoc.id,
- "subview": "xml",
- "previous_revision": prev,
- "updated_revision": ndoc.revision
- }
- except (RevisionNotFound, KeyError):
+ try:
+ # return the new revision number
+ return {
+ "document": ndoc.id,
+ "subview": "dc",
+ "previous_revision": current.revision,
+ "updated_revision": ndoc.revision
+ }
+ except Exception, e:
+ lib._rollback()
+ raise e
+ except RevisionNotFound: