Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#11709 closed (fixed)

Admin Inline with Exclude fails if two fkeys to same parent are present, despite fk_name being used

Reported by: yishaibeeri Owned by: brosner
Component: contrib.admin Version: 1.1
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

[ quick and dirty bug post (appears to be a small localized one); will try to add patch and tests in a short while ]

In validate_inline(), the check for excluded fkey neglects to pass the cls.fk_name arg to _get_foreign_key (line 172 in the current trunk revision) - thus the fk_name parameter given in the Inline is ignored and _get_foreign_key finds multiple fkeys to same parent - raising an exception.

Change History (4)

comment:1 Changed 6 years ago by brosner

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

comment:2 Changed 6 years ago by brosner

  • Owner changed from nobody to brosner
  • Status changed from new to assigned

comment:3 Changed 6 years ago by brosner

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [11630]) Fixed #11709 — Pass inline fk_name attribute when grabbing foreign key to test for exclusion. Thanks yishaibeeri for the report.

comment:4 Changed 6 years ago by brosner

(In [11632]) [1.1.X] Fixed #11709 — Pass inline fk_name attribute when grabbing foreign key to test for exclusion. Thanks yishaibeeri for the report.

Backport of [11630] from trunk

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