[Django] #25226: ArrayField doesn't set the model attribute on the base_field instance

8 views
Skip to first unread message

Django

unread,
Aug 4, 2015, 7:38:34 PM8/4/15
to django-...@googlegroups.com
#25226: ArrayField doesn't set the model attribute on the base_field instance
----------------------------------+----------------------------------------
Reporter: delinhabit | Owner:
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Keywords: arrayfield check-framework
Triage Stage: Unreviewed | Has patch: 1
Easy pickings: 0 | UI/UX: 0
----------------------------------+----------------------------------------
I found this issue while working on #25172. The ArrayField uses the check
framework to perform backend specific checks on the `base_field` instance,
but doesn't set the `model` attribute on it.
Since the backend specific field tests will use the model to route to the
appropriate db connection, we need to have the model set on the
`base_field` instance too.

Here's the PR in github with the proposed fix:
https://github.com/django/django/pull/5104

--
Ticket URL: <https://code.djangoproject.com/ticket/25226>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 4, 2015, 7:39:00 PM8/4/15
to django-...@googlegroups.com
#25226: ArrayField doesn't set the model attribute on the base_field instance
----------------------------------------+----------------------------

Reporter: delinhabit | Owner:
Type: Bug | Status: new
Component: contrib.postgres | Version: master
Severity: Normal | Resolution:

Keywords: arrayfield check-framework | Triage Stage: Unreviewed
Has patch: 1 | Easy pickings: 0
UI/UX: 0 |
----------------------------------------+----------------------------
Changes (by delinhabit):

* Attachment "arrayfield-set-model-on-base-field.diff" added.

The proposed fix

Django

unread,
Aug 5, 2015, 3:02:38 PM8/5/15
to django-...@googlegroups.com
#25226: ArrayField doesn't set the model attribute on the base_field instance
-------------------------------------+-------------------------------------
Reporter: delinhabit | Owner: Tim Graham
| <timograham@…>
Type: Bug | Status: closed
Component: contrib.postgres | Version: master
Severity: Normal | Resolution: fixed
Keywords: arrayfield check- | Triage Stage: Unreviewed
framework |

Has patch: 1 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* owner: => Tim Graham <timograham@…>
* resolution: => fixed


Comment:

In [changeset:"520802160a6c9e9dbe9f5859ae7e084b9000f850" 5208021]:
{{{
#!CommitTicketReference repository=""
revision="520802160a6c9e9dbe9f5859ae7e084b9000f850"
Fixed #25226 -- Set the model attribute on ArrayField's base_field
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25226#comment:1>

Django

unread,
Jan 14, 2017, 6:31:58 AM1/14/17
to django-...@googlegroups.com
#25226: ArrayField doesn't set the model attribute on the base_field instance
-------------------------------------+-------------------------------------
Reporter: Ion Scerbatiuc | Owner: Tim

| Graham <timograham@…>
Type: Bug | Status: closed
Component: contrib.postgres | Version: master

Severity: Normal | Resolution: fixed
Keywords: arrayfield check- | Triage Stage:
framework | Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

In [changeset:"2e55790838a75bf25a11115536dae57880cfccfb" 2e557908]:
{{{
#!CommitTicketReference repository=""
revision="2e55790838a75bf25a11115536dae57880cfccfb"
Refs #25226 -- Cloned ArrayField.base_field on deconstruction.

This prevents the base_field from sharing attributes with the one used
during migrations.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25226#comment:2>

Reply all
Reply to author
Forward
0 new messages