fix: dont db_set on unsaved document

This commit is contained in:
Ankush Menat 2022-10-18 17:32:40 +05:30
parent ab259343c2
commit 1bd61d5c25

View file

@ -1174,6 +1174,9 @@ class Document(BaseDocument):
# to trigger notification on value change
self.run_method("before_change")
if self.name is None:
return
frappe.db.set_value(
self.doctype,
self.name,