mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-18 04:02:35 +03:00
Update rest_framework/serializers.py
Co-authored-by: Sergei Shishov <sshishov@users.noreply.github.com>
This commit is contained in:
parent
7197a86428
commit
bb4102a162
|
@ -689,8 +689,11 @@ class ListSerializer(BaseSerializer):
|
|||
errors = []
|
||||
|
||||
for idx, item in enumerate(data):
|
||||
if hasattr(self, 'instance') and self.instance and \
|
||||
len(self.instance) > idx:
|
||||
if (
|
||||
hasattr(self, 'instance')
|
||||
and self.instance
|
||||
and len(self.instance) > idx
|
||||
):
|
||||
self.child.instance = self.instance[idx]
|
||||
try:
|
||||
validated = self.child.run_validation(item)
|
||||
|
|
Loading…
Reference in New Issue
Block a user