mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #27583 -- Fixed MultiValueDict.getlist() crash when values for key is None.
Restored the behavior before 727d7ce6cb.
This commit is contained in:
committed by
Tim Graham
parent
4de8aaf7ff
commit
8e3a72f4fb
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user