Opened 9 years ago

Closed 9 years ago

#5358 closed (duplicate)

[newforms-admin] django.newforms.models.inline_formset does not do anything with fk_name arg

Reported by: Antti Kaihola Owned by: nobody
Component: Forms Version: newforms-admin
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

There must be something wrong in
[source:/django/branches/newforms-admin/django/newforms/models.py django/newforms/models.py] function inline_formset().

If the fk_name argument is not None, the fk variable never gets initialized but is still used on line 340.

Attachments (1)

5358_fk_name_fix.diff (937 bytes) - added by Brian Rosner 9 years ago.
my solution to this.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 9 years ago by jkocherhans

Triage Stage: UnreviewedAccepted

You're right. An else clause is needed around line 340 to deal with the case where fk_name is given. Thanks for the report.

comment:2 Changed 9 years ago by jkocherhans

Summary: [newforms-admin] uninitialized local variable in newforms.models.inline_formset()[newforms-admin] django.newforms.models.inline_formset does not do anything with fk_name arg

Changed 9 years ago by Brian Rosner

Attachment: 5358_fk_name_fix.diff added

my solution to this.

comment:3 Changed 9 years ago by jkocherhans

Resolution: duplicate
Status: newclosed

Closed as a duplicate of #5488. That ticket has a better description and a slightly more robust patch.

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