Revert "fix!: Dont update modified by default in db.set_value (#18301)"

This reverts commit 6aaefd6633.
This commit is contained in:
Ankush Menat 2022-10-06 21:28:58 +05:30
parent bfa6a5fbdf
commit 64a0e19329
3 changed files with 2 additions and 3 deletions

View file

@ -840,7 +840,7 @@ class Database:
val=None,
modified=None,
modified_by=None,
update_modified=False,
update_modified=True,
debug=False,
for_update=True,
):

View file

@ -1144,7 +1144,7 @@ class Document(BaseDocument):
data = {"doctype": self.doctype, "name": self.name, "user": frappe.session.user}
frappe.publish_realtime("list_update", data, after_commit=True)
def db_set(self, fieldname, value=None, update_modified=False, notify=False, commit=False):
def db_set(self, fieldname, value=None, update_modified=True, notify=False, commit=False):
"""Set a value in the document object, update the timestamp and update the database.
WARNING: This method does not trigger controller validations and should

View file

@ -728,7 +728,6 @@ class TestDBSetValue(FrappeTestCase):
"test_set_value change 1",
modified=custom_modified,
modified_by=custom_modified_by,
update_modified=True,
)
self.assertTupleEqual(
(custom_modified, custom_modified_by),