mirror of
https://github.com/django/django.git
synced 2025-11-19 03:08:59 +00:00
Fixed #9362 -- Prevented inline forms from overwriting the content_type_id attribute on objets being inlined. Thanks to carljm for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
2c24bba934
commit
80a54dd23b
5 changed files with 54 additions and 3 deletions
|
|
@ -137,7 +137,7 @@ class InlineAdminForm(AdminForm):
|
|||
self.formset = formset
|
||||
self.original = original
|
||||
if original is not None:
|
||||
self.original.content_type_id = ContentType.objects.get_for_model(original).pk
|
||||
self.original_content_type_id = ContentType.objects.get_for_model(original).pk
|
||||
self.show_url = original and hasattr(original, 'get_absolute_url')
|
||||
super(InlineAdminForm, self).__init__(form, fieldsets, prepopulated_fields)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue