fix: Do frappe.db.commit() only for GET request
This commit is contained in:
parent
1cf1bc1e06
commit
133be72dfd
1 changed files with 2 additions and 1 deletions
|
|
@ -29,4 +29,5 @@ def make_access_log(doctype=None, document=None, method=None, file_type=None,
|
|||
doc.insert(ignore_permissions=True)
|
||||
|
||||
# `frappe.db.commit` added because insert doesnt `commit` when called in GET requests like `printview`
|
||||
frappe.db.commit()
|
||||
if frappe.request and frappe.request.method == 'GET':
|
||||
frappe.db.commit()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue