mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 05:04:31 +03:00
commit
28a39219d5
|
@ -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']
|
||||
|
|
Loading…
Reference in New Issue
Block a user