fix!: Dont update modified by default in db.set_value (#18301)
This commit is contained in:
parent
6ed3ce5875
commit
6aaefd6633
3 changed files with 3 additions and 2 deletions
|
|
@ -841,7 +841,7 @@ class Database:
|
|||
val=None,
|
||||
modified=None,
|
||||
modified_by=None,
|
||||
update_modified=True,
|
||||
update_modified=False,
|
||||
debug=False,
|
||||
for_update=True,
|
||||
):
|
||||
|
|
|
|||
|
|
@ -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=True, notify=False, commit=False):
|
||||
def db_set(self, fieldname, value=None, update_modified=False, 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
|
||||
|
|
|
|||
|
|
@ -728,6 +728,7 @@ 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),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue