fix: handle JSON content in run_doc_method
(cherry picked from commit d130a91d9c5d9158fb78563f5a20145a356d07f0)
This commit is contained in:
parent
899148072a
commit
a5a4f33644
1 changed files with 4 additions and 1 deletions
|
|
@ -223,7 +223,10 @@ def run_doc_method(method, docs=None, dt=None, dn=None, arg=None, args=None):
|
|||
doc = frappe.get_doc(dt, dn)
|
||||
|
||||
else:
|
||||
doc = frappe.get_doc(json.loads(docs))
|
||||
if isinstance(docs, str):
|
||||
docs = json.loads(docs)
|
||||
|
||||
doc = frappe.get_doc(docs)
|
||||
doc._original_modified = doc.modified
|
||||
doc.check_if_latest()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue