From 8559fc6b35a5e7ffe3f52fe5ca19590a56ac18ab Mon Sep 17 00:00:00 2001 From: James Bennett Date: Wed, 26 Nov 2008 21:21:43 +0000 Subject: [PATCH] Fixed an issue in ForeignKeyRawIdWidget where the values in limit_choices_to were always treated as lists even when they weren't git-svn-id: http://code.djangoproject.com/svn/django/trunk@9533 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/widgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django/contrib/admin/widgets.py b/django/contrib/admin/widgets.py index e2cd2113f8..291bee0b05 100644 --- a/django/contrib/admin/widgets.py +++ b/django/contrib/admin/widgets.py @@ -131,10 +131,10 @@ class ForeignKeyRawIdWidget(forms.TextInput): items = [] for k, v in self.rel.limit_choices_to.items(): if isinstance(v, list): - v = [str(x) for x in v] + v = ','.join([str(x) for x in v]) else: v = str(v) - items.append((k, ','.join(v))) + items.append((k, v)) params.update(dict(items)) return params