mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
updated comparison due to pep8 programming recommendations
http://www.python.org/dev/peps/pep-0008/#programming-recommendations
This commit is contained in:
parent
834f31ae4d
commit
774d687a31
|
@ -460,7 +460,7 @@ class ModelSerializer(Serializer):
|
||||||
"""
|
"""
|
||||||
self.m2m_data = {}
|
self.m2m_data = {}
|
||||||
|
|
||||||
if instance:
|
if instance is not None:
|
||||||
for key, val in attrs.items():
|
for key, val in attrs.items():
|
||||||
setattr(instance, key, val)
|
setattr(instance, key, val)
|
||||||
return instance
|
return instance
|
||||||
|
|
Loading…
Reference in New Issue
Block a user