From 520802160a6c9e9dbe9f5859ae7e084b9000f850 Mon Sep 17 00:00:00 2001 From: Ion Scerbatiuc Date: Tue, 4 Aug 2015 16:23:05 -0700 Subject: Fixed #25226 -- Set the model attribute on ArrayField's base_field --- tests/postgres_tests/test_array.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/postgres_tests/test_array.py') diff --git a/tests/postgres_tests/test_array.py b/tests/postgres_tests/test_array.py index d152f76b3d..0a41bf1bdd 100644 --- a/tests/postgres_tests/test_array.py +++ b/tests/postgres_tests/test_array.py @@ -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): -- cgit v1.3