mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-06-19 04:53:20 +03:00
commit
4b96614b12
|
@ -39,7 +39,7 @@ Declaring a serializer looks very similar to declaring a form:
|
||||||
an existing model instance, or create a new model instance.
|
an existing model instance, or create a new model instance.
|
||||||
"""
|
"""
|
||||||
if instance is not None:
|
if instance is not None:
|
||||||
instance.title = attrs.get('title', instance.title)
|
instance.email = attrs.get('email', instance.email)
|
||||||
instance.content = attrs.get('content', instance.content)
|
instance.content = attrs.get('content', instance.content)
|
||||||
instance.created = attrs.get('created', instance.created)
|
instance.created = attrs.get('created', instance.created)
|
||||||
return instance
|
return instance
|
||||||
|
|
Loading…
Reference in New Issue
Block a user