Changed the deprecated get_field_by_name to just get_field.

This commit is contained in:
Griatch 2016-02-19 22:31:42 +01:00
parent 5a9cf29f45
commit c0537fe456

View file

@ -382,8 +382,8 @@ class SharedMemoryModel(with_metaclass(SharedMemoryModelBase, Model)):
new = False
if "update_fields" in kwargs and kwargs["update_fields"]:
# get field objects from their names
update_fields = (self._meta.get_field_by_name(field)[0]
for field in kwargs.get("update_fields"))
update_fields = (self._meta.get_field(fieldname)
for fieldname in kwargs.get("update_fields"))
else:
# meta.fields are already field objects; get them all
new =True