mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-02-02 20:54:42 +03:00
More precise assertion error for bulk update
This commit is contained in:
parent
ed541864e6
commit
4482be46ae
|
@ -525,11 +525,11 @@ class ListSerializer(BaseSerializer):
|
|||
|
||||
def save(self, **kwargs):
|
||||
assert self.instance is None, (
|
||||
"Serializers do not support multiple update by default, because "
|
||||
"it would be unclear how to deal with insertions, updates and "
|
||||
"deletions. If you need to support multiple update, use a "
|
||||
"`ListSerializer` class and override `.save()` so you can specify "
|
||||
"the behavior exactly."
|
||||
"Serializers do not support multiple update by default, only "
|
||||
"multiple create. For updates it is unclear how to deal with "
|
||||
"insertions and deletions. If you need to support multiple update, "
|
||||
"use a `ListSerializer` class and override `.save()` so you can "
|
||||
"specify the behavior exactly."
|
||||
)
|
||||
|
||||
validated_data = [
|
||||
|
|
Loading…
Reference in New Issue
Block a user