Changed the deprecated get_field_by_name to just get_field.
This commit is contained in:
parent
5a9cf29f45
commit
c0537fe456
1 changed files with 2 additions and 2 deletions
|
|
@ -382,8 +382,8 @@ class SharedMemoryModel(with_metaclass(SharedMemoryModelBase, Model)):
|
||||||
new = False
|
new = False
|
||||||
if "update_fields" in kwargs and kwargs["update_fields"]:
|
if "update_fields" in kwargs and kwargs["update_fields"]:
|
||||||
# get field objects from their names
|
# get field objects from their names
|
||||||
update_fields = (self._meta.get_field_by_name(field)[0]
|
update_fields = (self._meta.get_field(fieldname)
|
||||||
for field in kwargs.get("update_fields"))
|
for fieldname in kwargs.get("update_fields"))
|
||||||
else:
|
else:
|
||||||
# meta.fields are already field objects; get them all
|
# meta.fields are already field objects; get them all
|
||||||
new =True
|
new =True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue