fix: Add a check to see if point is already reverted
This commit is contained in:
parent
4062bea097
commit
f4bfc42600
1 changed files with 2 additions and 0 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue