InlineAdminForm clobbers "content_type_id"
|Reported by:||tclineks||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
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.
Change History (4)
Changed 6 years ago by tclineks
comment:1 Changed 6 years ago by Alex
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Resolution set to duplicate
- Status changed from new to closed