mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-03 13:14:30 +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.
|
||||
"""
|
||||
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.created = attrs.get('created', instance.created)
|
||||
return instance
|
||||
|
|
Loading…
Reference in New Issue
Block a user