[Django] #23451: inlineformset_factory with wrong fk_name throws ValueError with wrong message

20 views
Skip to first unread message

Django

unread,
Sep 8, 2014, 3:52:27 PM9/8/14
to django-...@googlegroups.com
#23451: inlineformset_factory with wrong fk_name throws ValueError with wrong
message
----------------------------+----------------------
Reporter: petraszd | Owner: petraszd
Type: Bug | Status: new
Component: Forms | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+----------------------
Because of typo, passing wrong fk_name kwarg causes inlineformset_factory
to throw ValueError with cryptic message:
"unsupported format character ''' (0x27) at index 41"

Instead of nice formatted one: "fk_name 'foo' is not a ForeignKey to
'foo.Foo'."

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

Django

unread,
Sep 8, 2014, 4:05:53 PM9/8/14
to django-...@googlegroups.com
#23451: inlineformset_factory with wrong fk_name throws ValueError with wrong
message
--------------------------+--------------------------------------
Reporter: petraszd | Owner: petraszd
Type: Bug | Status: assigned
Component: Forms | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
--------------------------+--------------------------------------
Changes (by petraszd):

* status: new => assigned
* needs_docs: => 0
* has_patch: 0 => 1
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

Fixed in: https://github.com/django/django/pull/3198

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

Django

unread,
Sep 8, 2014, 5:15:42 PM9/8/14
to django-...@googlegroups.com
#23451: inlineformset_factory with wrong fk_name throws ValueError with wrong
message
--------------------------+---------------------------------------------
Reporter: petraszd | Owner: petraszd
Type: Bug | Status: assigned
Component: Forms | Version: 1.7
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):

* version: master => 1.7
* stage: Unreviewed => Ready for checkin


Comment:

Will add release notes and commit this.

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

Django

unread,
Sep 8, 2014, 5:22:51 PM9/8/14
to django-...@googlegroups.com
#23451: inlineformset_factory with wrong fk_name throws ValueError with wrong
message
--------------------------+---------------------------------------------
Reporter: petraszd | Owner: petraszd
Type: Bug | Status: closed
Component: Forms | Version: 1.7
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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"f7eee04ebe32277d2f3d7860abfb9a22c6ccf19d"]:
{{{
#!CommitTicketReference repository=""
revision="f7eee04ebe32277d2f3d7860abfb9a22c6ccf19d"
Fixed #23451 -- Fixed typo in inlineformset_factory() error message.
}}}

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

Django

unread,
Sep 8, 2014, 5:23:07 PM9/8/14
to django-...@googlegroups.com
#23451: inlineformset_factory with wrong fk_name throws ValueError with wrong
message
--------------------------+---------------------------------------------
Reporter: petraszd | Owner: petraszd

Type: Bug | Status: closed
Component: Forms | Version: 1.7
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:"a3e9e9e6c6dc9ccff85c2a6d8db88cc207127f0c"]:
{{{
#!CommitTicketReference repository=""
revision="a3e9e9e6c6dc9ccff85c2a6d8db88cc207127f0c"
[1.7.x] Fixed #23451 -- Fixed typo in inlineformset_factory() error
message.

Backport of f7eee04ebe from master
}}}

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

Reply all
Reply to author
Forward
0 new messages