fix: set default value in set_value as None to avoid error.

```
frappe.db.set_value('Call Log', log.name, {
			fieldname: doc.name,
			display_name_field: doc.get_title()
		}, update_modified=False)
```
this code should not fail if value is not pass because value is passed in the dict.
This commit is contained in:
Suraj Shetty 2019-09-23 15:54:46 +05:30 committed by GitHub
parent 5a3bdff130
commit 7fe35a2d3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -607,7 +607,7 @@ class Database(object):
"""Update multiple values. Alias for `set_value`."""
return self.set_value(*args, **kwargs)
def set_value(self, dt, dn, field, val, modified=None, modified_by=None,
def set_value(self, dt, dn, field, val=None, modified=None, modified_by=None,
update_modified=True, debug=False):
"""Set a single value in the database, do not call the ORM triggers
but update the modified timestamp (unless specified not to).