Opened 6 years ago

Last modified 6 years ago

#29465 closed Bug

Admin._changeform_view incorrectly initializes ModelForm instance — at Initial Version

Reported by: Gert Steyn Owned by: nobody
Component: contrib.admin Version: 2.0
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

form = ModelForm(request.POST, request.FILES, instance=obj)

this line should be:

form = ModelForm(data=request.POST, files=request.FILES, instance=obj)

data and files are not positional arguments, this causes issues if a form with additional kwargs is used.

Change History (0)

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