mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-18 04:02:35 +03:00
fix: Make the instance variable of child serializer point to the correct list object instead of the entire list when validating ListSerializer
This commit is contained in:
parent
b9b50bd0cc
commit
869d46fc42
|
@ -837,7 +837,7 @@ class TestMultipleObjectsValidation(unittest.TestCase):
|
|||
def test_exception_raised_when_data_and_instance_length_different(self):
|
||||
|
||||
with self.assertRaises(AssertionError):
|
||||
MyClassSerializer(
|
||||
serializer = MyClassSerializer(
|
||||
data=[{'value': 'set', 'id': instance.id} for instance in
|
||||
self.objs],
|
||||
instance=self.objs[:-1],
|
||||
|
|
Loading…
Reference in New Issue
Block a user