Nested ArrayField seems to be broken in 1.9, it creates an error when running the system checks.
-- Using a nested ArrayField from the docs will cause the error in 1.9 (but works on 1.8.7):
models.py:
from django.contrib.postgres.fields import ArrayFieldfrom django.db import modelsclass Board(models.Model):pieces = ArrayField(ArrayField(models.IntegerField()))
When running runserver on an new project with this model on 1.9 it triggers the following error:
Unhandled exception in thread started by <function wrapper at 0xb61e3844>Traceback (most recent call last):File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapperfn(*args, **kwargs)File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_runself.check(display_num_errors=True)File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/core/management/base.py", line 426, in checkinclude_deployment_checks=include_deployment_checks,File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 75, in run_checksnew_errors = check(app_configs=app_configs)File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/core/checks/model_checks.py", line 28, in check_all_modelserrors.extend(model.check(**kwargs))File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/db/models/base.py", line 1170, in checkerrors.extend(cls._check_fields(**kwargs))File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/db/models/base.py", line 1247, in _check_fieldserrors.extend(field.check(**kwargs))File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/contrib/postgres/fields/array.py", line 49, in checkbase_errors = self.base_field.check()File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/contrib/postgres/fields/array.py", line 49, in checkbase_errors = self.base_field.check()File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 1820, in checkerrors = super(IntegerField, self).check(**kwargs)File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 208, in checkerrors.extend(self._check_backend_specific_checks(**kwargs))File "/home/vagrant/.virtualenvs/djangotest/local/lib/python2.7/site-packages/django/db/models/fields/__init__.py", line 314, in _check_backend_specific_checksapp_label = self.model._meta.app_labelAttributeError: 'IntegerField' object has no attribute 'model'
Am I missing something? Non nested ArrayField works ok, just a nested ArrayField triggers the problem.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/9175cc73-f38c-4d07-bd60-5817604e25e0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment