mirror of
https://github.com/django/django.git
synced 2025-09-01 00:08:13 +00:00
Fixed #27583 -- Fixed MultiValueDict.getlist() crash when values for key is None.
Restored the behavior before 727d7ce6cb
.
This commit is contained in:
parent
4de8aaf7ff
commit
8e3a72f4fb
2 changed files with 6 additions and 1 deletions
|
@ -119,6 +119,11 @@ class MultiValueDictTests(SimpleTestCase):
|
|||
values = x.getlist('b', default=MISSING)
|
||||
self.assertIs(values, MISSING)
|
||||
|
||||
def test_getlist_none_empty_values(self):
|
||||
x = MultiValueDict({'a': None, 'b': []})
|
||||
self.assertIsNone(x.getlist('a'))
|
||||
self.assertEqual(x.getlist('b'), [])
|
||||
|
||||
|
||||
class ImmutableListTests(SimpleTestCase):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue