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):
|
def save(self, **kwargs):
|
||||||
assert self.instance is None, (
|
assert self.instance is None, (
|
||||||
"Serializers do not support multiple update by default, because "
|
"Serializers do not support multiple update by default, only "
|
||||||
"it would be unclear how to deal with insertions, updates and "
|
"multiple create. For updates it is unclear how to deal with "
|
||||||
"deletions. If you need to support multiple update, use a "
|
"insertions and deletions. If you need to support multiple update, "
|
||||||
"`ListSerializer` class and override `.save()` so you can specify "
|
"use a `ListSerializer` class and override `.save()` so you can "
|
||||||
"the behavior exactly."
|
"specify the behavior exactly."
|
||||||
)
|
)
|
||||||
|
|
||||||
validated_data = [
|
validated_data = [
|
||||||
|
|
Loading…
Reference in New Issue
Block a user