Ticket #25954: arrayfield_set_model_on_nested_arrayfields.diff
File arrayfield_set_model_on_nested_arrayfields.diff, 636 bytes (added by , 9 years ago) |
---|
-
django/contrib/postgres/fields/array.py
31 31 32 32 def contribute_to_class(self, cls, name, **kwargs): 33 33 super(ArrayField, self).contribute_to_class(cls, name, **kwargs) 34 self._set_base_field_model(cls) 35 36 def _set_base_field_model(self, cls): 34 37 self.base_field.model = cls 38 if isinstance(self.base_field, ArrayField): 39 self.base_field._set_base_field_model(cls) 35 40 36 41 def check(self, **kwargs): 37 42 errors = super(ArrayField, self).check(**kwargs)