mirror of
https://github.com/django/django.git
synced 2025-07-20 01:29:11 +00:00
[1.0.X] Fixed an issue in ForeignKeyRawIdWidget where the values in limit_choices_to were always treated as lists even when they weren't. Was [9533] in trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9534 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
1ca99e901f
commit
b3f278258a
@ -131,10 +131,10 @@ class ForeignKeyRawIdWidget(forms.TextInput):
|
|||||||
items = []
|
items = []
|
||||||
for k, v in self.rel.limit_choices_to.items():
|
for k, v in self.rel.limit_choices_to.items():
|
||||||
if isinstance(v, list):
|
if isinstance(v, list):
|
||||||
v = [str(x) for x in v]
|
v = ','.join([str(x) for x in v])
|
||||||
else:
|
else:
|
||||||
v = str(v)
|
v = str(v)
|
||||||
items.append((k, ','.join(v)))
|
items.append((k, v))
|
||||||
params.update(dict(items))
|
params.update(dict(items))
|
||||||
return params
|
return params
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user