Opened 6 years ago

Closed 6 years ago

Last modified 6 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 Changed 6 years ago by petraszd

Has patch: set
Status: newassigned

comment:2 Changed 6 years ago by Tim Graham

Triage Stage: UnreviewedReady for checkin
Version: master1.7

Will add release notes and commit this.

comment:3 Changed 6 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In f7eee04ebe32277d2f3d7860abfb9a22c6ccf19d:

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

comment:4 Changed 6 years ago by Tim Graham <timograham@…>

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