hotfix: dont_update_if_missing
This commit is contained in:
parent
dcbfb5dae1
commit
eb9c558cf0
1 changed files with 3 additions and 0 deletions
|
|
@ -48,6 +48,7 @@ def get_controller(doctype):
|
|||
class Document(BaseDocument):
|
||||
def __init__(self, arg1, arg2=None):
|
||||
self.doctype = self.name = None
|
||||
|
||||
if arg1 and isinstance(arg1, basestring):
|
||||
if not arg2:
|
||||
# single
|
||||
|
|
@ -72,6 +73,8 @@ class Document(BaseDocument):
|
|||
# incorrect arguments. let's not proceed.
|
||||
raise frappe.DataError("Document({0}, {1})".format(arg1, arg2))
|
||||
|
||||
self.dont_update_if_missing = []
|
||||
|
||||
def load_from_db(self):
|
||||
if not getattr(self, "_metaclass", False) and self.meta.issingle:
|
||||
self.update(frappe.db.get_singles_dict(self.doctype))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue