mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Refs #25226 -- Cloned ArrayField.base_field on deconstruction.
This prevents the base_field from sharing attributes with the one used during migrations.
This commit is contained in:
committed by
Tim Graham
parent
f4c0eec713
commit
2e55790838
@@ -441,6 +441,7 @@ class TestMigrations(TransactionTestCase):
|
||||
name, path, args, kwargs = field.deconstruct()
|
||||
new = ArrayField(*args, **kwargs)
|
||||
self.assertEqual(type(new.base_field), type(field.base_field))
|
||||
self.assertIsNot(new.base_field, field.base_field)
|
||||
|
||||
def test_deconstruct_with_size(self):
|
||||
field = ArrayField(models.IntegerField(), size=3)
|
||||
|
||||
Reference in New Issue
Block a user