Merge pull request #18453 from ankush/db_set_null

fix: dont `db_set` on unsaved document
This commit is contained in:
Ankush Menat 2022-10-18 22:01:45 +05:30 committed by GitHub
commit d0715dd574
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,