Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23451 closed Bug (fixed)

inlineformset_factory with wrong fk_name throws ValueError with wrong message

Reported by: petraszd Owned by: petraszd
Component: Forms Version: 1.7
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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'."

Change History (4)

comment:1 by petraszd, 10 years ago

Has patch: set
Status: newassigned

comment:2 by Tim Graham, 10 years ago

Triage Stage: UnreviewedReady for checkin
Version: master1.7

Will add release notes and commit this.

comment:3 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: assignedclosed

In f7eee04ebe32277d2f3d7860abfb9a22c6ccf19d:

Fixed #23451 -- Fixed typo in inlineformset_factory() error message.

comment:4 by Tim Graham <timograham@…>, 10 years ago

In a3e9e9e6c6dc9ccff85c2a6d8db88cc207127f0c:

[1.7.x] Fixed #23451 -- Fixed typo in inlineformset_factory() error message.

Backport of f7eee04ebe from master

Note: See TracTickets for help on using tickets.
Back to Top