1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #27989 -- Preserved empty QueryDicts for form's data/files args.

This commit is contained in:
Stefan Wehrmeyer
2017-03-28 12:27:49 -04:00
committed by Tim Graham
parent 24023c6a8f
commit 1aa8e8605c
2 changed files with 9 additions and 2 deletions

View File

@@ -76,8 +76,8 @@ class BaseForm:
initial=None, error_class=ErrorList, label_suffix=None,
empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None):
self.is_bound = data is not None or files is not None
self.data = data or {}
self.files = files or {}
self.data = {} if data is None else data
self.files = {} if files is None else files
self.auto_id = auto_id
if prefix is not None:
self.prefix = prefix