Fixed #30243 -- Simplified ModelAdmin.render_change_form()'s has_file_field.
This commit is contained in:
parent
7c68cea7ee
commit
7c3a8b9db2
|
@ -1125,7 +1125,7 @@ class ModelAdmin(BaseModelAdmin):
|
||||||
'has_delete_permission': self.has_delete_permission(request, obj),
|
'has_delete_permission': self.has_delete_permission(request, obj),
|
||||||
'has_editable_inline_admin_formsets': has_editable_inline_admin_formsets,
|
'has_editable_inline_admin_formsets': has_editable_inline_admin_formsets,
|
||||||
'has_file_field': context['adminform'].form.is_multipart() or any(
|
'has_file_field': context['adminform'].form.is_multipart() or any(
|
||||||
admin_formset.formset.form().is_multipart()
|
admin_formset.formset.is_multipart()
|
||||||
for admin_formset in context['inline_admin_formsets']
|
for admin_formset in context['inline_admin_formsets']
|
||||||
),
|
),
|
||||||
'has_absolute_url': view_on_site_url is not None,
|
'has_absolute_url': view_on_site_url is not None,
|
||||||
|
|
Loading…
Reference in New Issue