Author: ubernostrum
Date: 2008-11-26 15:22:07 -0600 (Wed, 26 Nov 2008)
New Revision: 9534
Modified:
django/branches/releases/1.0.X/django/contrib/admin/widgets.py
Log:
[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.
Modified: django/branches/releases/1.0.X/django/contrib/admin/widgets.py
===================================================================
--- django/branches/releases/1.0.X/django/contrib/admin/widgets.py
2008-11-26 21:21:43 UTC (rev 9533)
+++ django/branches/releases/1.0.X/django/contrib/admin/widgets.py
2008-11-26 21:22:07 UTC (rev 9534)
@@ -131,10 +131,10 @@
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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---