[Django] #25560: Empty string related name should be invalid

5 views
Skip to first unread message

Django

unread,
Oct 16, 2015, 11:37:10 AM10/16/15
to django-...@googlegroups.com
#25560: Empty string related name should be invalid
-----------------------------------------+------------------------
Reporter: charettes | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
The actual model field check is
[https://github.com/django/django/blob/de99f558d806a2a1b30072ec95bc44d412d80dab/django/db/models/fields/related.py#L121-L147
skipped] if the `related_name` is an empty string when a warning should be
raised since it's an invalid Python identifier.

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

Django

unread,
Oct 16, 2015, 12:25:01 PM10/16/15
to django-...@googlegroups.com
#25560: Empty string related name should be invalid
-------------------------------+------------------------------------

Reporter: charettes | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+------------------------------------
Changes (by charettes):

* has_patch: 0 => 1


Comment:

[https://github.com/django/django/pull/5437 PR]

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

Django

unread,
Oct 16, 2015, 2:09:26 PM10/16/15
to django-...@googlegroups.com
#25560: Empty string related name should be invalid
-------------------------------------+-------------------------------------

Reporter: charettes | Owner: nobody
Type: Bug | Status: new
Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* component: Uncategorized => Core (System checks)
* stage: Accepted => Ready for checkin


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

Django

unread,
Oct 16, 2015, 2:24:01 PM10/16/15
to django-...@googlegroups.com
#25560: Empty string related name should be invalid
-------------------------------------+-------------------------------------
Reporter: charettes | Owner: nobody
Type: Bug | Status: closed

Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette <charette.s@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"c1b6a8a98b08fedfa3f3c69bc7add94c5841ba57" c1b6a8a]:
{{{
#!CommitTicketReference repository=""
revision="c1b6a8a98b08fedfa3f3c69bc7add94c5841ba57"
Fixed #25560 -- Made empty string related_name invalid.

Thanks to Ali Lotfi for the initial report and patch
and Tim Graham for the review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25560#comment:3>

Django

unread,
Oct 19, 2015, 10:25:01 AM10/19/15
to django-...@googlegroups.com
#25560: Empty string related name should be invalid
-------------------------------------+-------------------------------------
Reporter: charettes | Owner: nobody

Type: Bug | Status: closed
Component: Core (System | Version: master
checks) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"3aeb84df250c2f739df1f551739434fb5839c53c" 3aeb84df]:
{{{
#!CommitTicketReference repository=""
revision="3aeb84df250c2f739df1f551739434fb5839c53c"
[1.9.x] Fixed #25560 -- Made empty string related_name invalid.

Thanks to Ali Lotfi for the initial report and patch
and Tim Graham for the review.

Backport of c1b6a8a98b08fedfa3f3c69bc7add94c5841ba57 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25560#comment:4>

Reply all
Reply to author
Forward
0 new messages