mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #25226 -- Set the model attribute on ArrayField's base_field
This commit is contained in:
committed by
Tim Graham
parent
244404227e
commit
520802160a
@@ -97,6 +97,12 @@ class TestSaveLoad(PostgreSQLTestCase):
|
||||
self.assertEqual(instance.uuids, loaded.uuids)
|
||||
self.assertEqual(instance.decimals, loaded.decimals)
|
||||
|
||||
def test_model_set_on_base_field(self):
|
||||
instance = IntegerArrayModel()
|
||||
field = instance._meta.get_field('field')
|
||||
self.assertEqual(field.model, IntegerArrayModel)
|
||||
self.assertEqual(field.base_field.model, IntegerArrayModel)
|
||||
|
||||
|
||||
class TestQuerying(PostgreSQLTestCase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user