fix: dont set '__unsaved' for single doctypes

This commit is contained in:
Gavin D'souza 2020-07-13 17:42:23 +05:30
parent 62957312c5
commit 90cab5a2aa

View file

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