From 7c50e7eeccd4b4581542547f5ddb603bbd62a725 Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Sun, 21 Dec 2014 11:21:37 +0100 Subject: Fixed #24034 -- Don't always overwrite deconstruct path. Made deconstruct path overwriting for ArrayField conditional, so it only occurs when the deconstructed field is an instance of ArrayField itself and not a subclass. --- tests/postgres_tests/models.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/postgres_tests/models.py') diff --git a/tests/postgres_tests/models.py b/tests/postgres_tests/models.py index a119b12f04..d6cf3da786 100644 --- a/tests/postgres_tests/models.py +++ b/tests/postgres_tests/models.py @@ -32,3 +32,8 @@ class CharFieldModel(models.Model): class TextFieldModel(models.Model): field = models.TextField() + + +class ArrayFieldSubclass(ArrayField): + def __init__(self, *args, **kwargs): + super(ArrayFieldSubclass, self).__init__(models.IntegerField()) -- cgit v1.3