diff options
| author | Jernej Kos <jernej@kos.mx> | 2014-12-21 11:21:37 +0100 |
|---|---|---|
| committer | Jernej Kos <jernej@kos.mx> | 2014-12-21 17:31:50 +0100 |
| commit | 7c50e7eeccd4b4581542547f5ddb603bbd62a725 (patch) | |
| tree | 78636e7a5df768eec1a472471409fbd18702a830 /tests/postgres_tests/models.py | |
| parent | 07728a2c2c78b030b7de9c6b20ef028f82d6134a (diff) | |
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.
Diffstat (limited to 'tests/postgres_tests/models.py')
| -rw-r--r-- | tests/postgres_tests/models.py | 5 |
1 files changed, 5 insertions, 0 deletions
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()) |
