fix: Add a check to see if point is already reverted

This commit is contained in:
Suraj Shetty 2019-07-04 23:01:39 +05:30
parent 4062bea097
commit f4bfc42600

View file

@ -214,6 +214,8 @@ def revert(name, reason):
if doc_to_revert.type != 'Auto':
frappe.throw(_('This document cannot be reverted'))
if doc_to_revert.reverted: return
doc_to_revert.reverted = 1
doc_to_revert.save(ignore_permissions=True)