Opened 7 years ago

Closed 7 years ago

#5358 closed (duplicate)

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

Reported by: akaihola 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 brosner 7 years ago.
my solution to this.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 7 years ago by jkocherhans

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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

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

Changed 7 years ago by brosner

my solution to this.

comment:3 Changed 7 years ago by jkocherhans

  • Resolution set to duplicate
  • Status changed from new to closed

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