Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#10698 closed (duplicate)

Admin code overwrites property of models in inlineformsets

Reported by: Matthias Kestenholz Owned by: nobody
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

In InlineAdminForm, original is used to display the object that is being edited in an inline formset. To be able to redirect the user to the location given by original.get_absolute_url, the content type ID of original is determined and stored as an attribute on original. If original itself already had a content_type field however, the value of this field is overwritten. If original.content_object is accessed, and object of class original.class is returned (or None) instead of the correct type....

The attached patch does not really fix this behavior, because we still overwrite values on original, but admin_helpers_content_type_id is (much) less likely to be used than content_type_id

Attachments (1)

10698.patch (3.7 KB ) - added by Matthias Kestenholz 15 years ago.

Download all attachments as: .zip

Change History (4)

by Matthias Kestenholz, 15 years ago

Attachment: 10698.patch added

comment:1 by Jacob, 15 years ago

milestone: 1.1
Triage Stage: UnreviewedAccepted

comment:2 by Matthias Kestenholz, 15 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #9362, fixed in [10667]

comment:3 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

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