diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py
index 1978b3e..61b05b1 100644
a
|
b
|
def url_params_from_lookup_dict(lookups):
|
100 | 100 | if lookups and hasattr(lookups, 'items'): |
101 | 101 | items = [] |
102 | 102 | for k, v in lookups.items(): |
103 | | if isinstance(v, list): |
| 103 | if isinstance(v, (tuple, list)): |
104 | 104 | v = u','.join([str(x) for x in v]) |
105 | 105 | elif isinstance(v, bool): |
106 | 106 | # See django.db.fields.BooleanField.get_prep_lookup |
diff --git a/tests/regressiontests/admin_widgets/tests.py b/tests/regressiontests/admin_widgets/tests.py
index 7ad74a3..9fde201 100644
a
|
b
|
from django.contrib import admin
|
8 | 8 | from django.contrib.admin import widgets |
9 | 9 | from django.contrib.admin.widgets import (FilteredSelectMultiple, |
10 | 10 | AdminSplitDateTime, AdminFileWidget, ForeignKeyRawIdWidget, AdminRadioSelect, |
11 | | RelatedFieldWidgetWrapper, ManyToManyRawIdWidget) |
| 11 | RelatedFieldWidgetWrapper, ManyToManyRawIdWidget, |
| 12 | url_params_from_lookup_dict) |
12 | 13 | from django.core.files.storage import default_storage |
13 | 14 | from django.core.files.uploadedfile import SimpleUploadedFile |
14 | 15 | from django.db.models import DateField |
… |
… |
class AdminForeignKeyRawIdWidget(DjangoTestCase):
|
180 | 181 | self.assertContains(response, |
181 | 182 | 'Select a valid choice. That choice is not one of the available choices.') |
182 | 183 | |
| 184 | def test_url_params_from_lookup_dict_any_iterable(self): |
| 185 | lookup1 = url_params_from_lookup_dict({'color__in': ('red', 'blue')}) |
| 186 | lookup2 = url_params_from_lookup_dict({'color__in': ['red', 'blue']}) |
| 187 | self.assertEqual(lookup1, {'color__in': 'red,blue'}) |
| 188 | self.assertEqual(lookup1, lookup2) |
| 189 | |
183 | 190 | |
184 | 191 | class FilteredSelectMultipleWidgetTest(TestCase): |
185 | 192 | def test_render(self): |