Merge pull request #14303 from frappe/mergify/bp/develop/pr-13929
fix: handle JSON content in run_doc_method (backport #13929)
This commit is contained in:
commit
6078cbabaa
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