updated comparison due to pep8 programming recommendations

http://www.python.org/dev/peps/pep-0008/#programming-recommendations
This commit is contained in:
Stephan Groß 2012-11-21 13:35:20 +01:00
parent 196fa5e94f
commit 9459289d7d

View File

@ -34,7 +34,7 @@ Declaring a serializer looks very similar to declaring a form:
created = serializers.DateTimeField()
def restore_object(self, attrs, instance=None):
if instance:
if instance is not None:
instance.title = attrs['title']
instance.content = attrs['content']
instance.created = attrs['created']