Skip to content

Commit

Permalink
fix: dont set '__unsaved' for single doctypes
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed Jul 13, 2020
1 parent 6295731 commit 90cab5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frappe/model/create_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def make_new_doc(doctype):
doc = doc.get_valid_dict(sanitize=False)
doc["doctype"] = doctype
doc["__islocal"] = 1
doc["__unsaved"] = 1

if not frappe.model.meta.is_single(doctype):
doc["__unsaved"] = 1

return doc

Expand Down

0 comments on commit 90cab5a

Please sign in to comment.