Opened 7 years ago

Closed 7 years ago

Last modified 5 years ago

#10963 closed (duplicate)

InlineAdminForm clobbers "content_type_id"

Reported by: Travis Cline Owned by: nobody
Component: contrib.admin Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

To properly build a view on site link InlineAdminForm's init stores the ContentType id on the instance for lookup in the template(s). This name clobbers the common case with GenericForeignKeys. Setting that attribute means later lookups in ReverseSingleRelatedObjectDescriptor.get pick up this value.

I haven't isolated this into a regression test and am attaching a naive patch just making the name less likely to collide.

Attachments (1)

0001-changed-attribute-name-holding-an-inline-instance-s.patch (2.7 KB) - added by Travis Cline 7 years ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 7 years ago by Alex Gaynor

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Resolution: duplicate
Status: newclosed

Dupe of #9362

comment:2 Changed 7 years ago by Travis Cline

Ha. Thanks Alex. that was quick.

comment:3 Changed 5 years ago by Jacob

milestone: 1.1

Milestone 1.1 deleted

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