fix!: Don't update document from keyword args (#32898)
Right now if you do this: `get_doc(doctype, name, field=value)` then it loads document from DB and then updates field to value. This is absurd API and I don't think it was ever done intentionally.
This commit is contained in:
parent
44681433c9
commit
b162c0d6ec
1 changed files with 0 additions and 2 deletions
|
|
@ -194,8 +194,6 @@ class Document(BaseDocument):
|
|||
# since it is used in virtual doctypes and inherited in child classes
|
||||
self.flags.for_update = kwargs.pop("for_update", None)
|
||||
self.load_from_db()
|
||||
if kwargs: # ad-hoc overrides
|
||||
self._init_from_kwargs(kwargs)
|
||||
|
||||
def _init_dispatch(self, arg, *args, **kwargs):
|
||||
if isinstance(arg, str):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue