Opened 17 years ago

Closed 17 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: no UI/UX: no

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 17 years ago.
my solution to this.

Download all attachments as: .zip

Change History (4)

comment:1 by jkocherhans, 17 years ago

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 by jkocherhans, 17 years ago

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

by Brian Rosner, 17 years ago

Attachment: 5358_fk_name_fix.diff added

my solution to this.

comment:3 by jkocherhans, 17 years ago

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