[home] Prevent TransactionManagementError resulting from history document conversion failure
Currently all other document conversions use _create_doc2() which is wrapped
by atomic block except history document conversion which uses _historify()
@@ -87,6 +87,7 @@ class DocumentConverter(object):
data['isSaved'] = False
data['snippets'][0]['lastExecuted'] = time.mktime(doc.last_modified.timetuple()) * 1000
+ with transaction.atomic():
doc2 = _historify(data, self.user)
doc2.last_modified = doc.last_modified
