diff --git a/django/contrib/formtools/wizard/storage/cookie.py b/django/contrib/formtools/wizard/storage/cookie.py
index af26e01..b28a6bc 100644
a
|
b
|
|
1 | 1 | from django.core.exceptions import SuspiciousOperation |
2 | 2 | from django.core.signing import BadSignature |
3 | 3 | from django.utils import simplejson as json |
| 4 | from django.utils.datastructures import MultiValueDict |
4 | 5 | |
5 | 6 | from django.contrib.formtools.wizard import storage |
6 | 7 | |
… |
… |
class CookieStorage(storage.BaseStorage):
|
23 | 24 | raise SuspiciousOperation('FormWizard cookie manipulated') |
24 | 25 | if data is None: |
25 | 26 | return None |
26 | | return json.loads(data, cls=json.JSONDecoder) |
| 27 | |
| 28 | json_data = json.loads(data, cls=json.JSONDecoder) |
| 29 | if self.step_data_key in json_data: |
| 30 | for step, form_data in json_data[self.step_data_key].iteritems(): |
| 31 | form_dict = MultiValueDict() |
| 32 | for key, value in form_data.items(): |
| 33 | if isinstance(value, list): |
| 34 | form_dict.setlist(key, value) |
| 35 | else: |
| 36 | form_dict[key] = value |
| 37 | json_data[self.step_data_key][step] = form_dict |
| 38 | return json_data |