aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Groß2012-11-21 14:58:33 +0100
committerStephan Groß2012-11-21 14:58:33 +0100
commit774d687a311813a45ac9b2d3e1570c8bbca092fd (patch)
tree4cc8c0169033b80b9a010f10f24bb8a722959f3a
parent834f31ae4d77378f8a56b8647564b50c56bcabb8 (diff)
downloaddjango-rest-framework-774d687a311813a45ac9b2d3e1570c8bbca092fd.tar.bz2
updated comparison due to pep8 programming recommendations
http://www.python.org/dev/peps/pep-0008/#programming-recommendations
-rw-r--r--rest_framework/serializers.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/rest_framework/serializers.py b/rest_framework/serializers.py
index f7918c4c..9f4964fa 100644
--- a/rest_framework/serializers.py
+++ b/rest_framework/serializers.py
@@ -460,7 +460,7 @@ class ModelSerializer(Serializer):
"""
self.m2m_data = {}
- if instance:
+ if instance is not None:
for key, val in attrs.items():
setattr(instance, key, val)
return instance