Author: ubernostrum
Date: 2008-11-26 15:21:43 -0600 (Wed, 26 Nov 2008)
New Revision: 9533
Modified:
django/trunk/django/contrib/admin/widgets.py
Log:
Fixed an issue in ForeignKeyRawIdWidget where the values in limit_choices_to
were always treated as lists even when they weren't
Modified: django/trunk/django/contrib/admin/widgets.py
===================================================================
--- django/trunk/django/contrib/admin/widgets.py 2008-11-24 22:33:32 UTC
(rev 9532)
+++ django/trunk/django/contrib/admin/widgets.py 2008-11-26 21:21:43 UTC
(rev 9533)
@@ -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
-~----------~----~----~----~------~----~------~--~---