Merge pull request #18453 from ankush/db_set_null
fix: dont `db_set` on unsaved document
This commit is contained in:
commit
d0715dd574
1 changed files with 3 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue