Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#31265 closed Bug (invalid)

Bug in ModelAdmin.render_change_form()'s has_file_field check.

Reported by: Tatiana Vasilevskaya Owned by: nobody
Component: contrib.admin Version: 2.2
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

ModelAdmin.render_change_form()'s has_file_field check instantiates a formset form without calling get_form_kwargs in admin_formset.formset.form().is_multipart() and thus might fail in case of a customized __init__ of the formset form (designed to be used with the customized get_form_kwargs). Cherry-pick of https://github.com/django/django/commit/7c3a8b9db2ccfbb247732ce6726ab8dc11eff34d into 2.2.x fixes the problem.

Change History (1)

comment:1 by Mariusz Felisiak, 5 years ago

Resolution: invalid
Status: newclosed
Summary: Bug in ModelAdmin.render_change_form()'s has_file_field checkBug in ModelAdmin.render_change_form()'s has_file_field check.

Thanks for ticket, however Django 2.2 is in extended support so it doesn't receive bugfixes anymore (except for security fixes and data loss bugs).

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