fix: Do frappe.db.commit() only for GET request

This commit is contained in:
Suraj Shetty 2021-08-19 18:21:40 +05:30
parent 1cf1bc1e06
commit 133be72dfd

View file

@ -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()