1
0
mirror of https://github.com/django/django.git synced 2025-07-04 09:49:12 +00:00

newforms-admin: Fixed a bug in ManyToManyRawIdWidget where a list of integers needed to be converted to a comma separated string for display.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@6323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Joseph Kocherhans 2007-09-15 19:59:52 +00:00
parent 3534c4cf39
commit 709f801877

View File

@ -99,7 +99,7 @@ class ManyToManyRawIdWidget(ForeignKeyRawIdWidget):
def render(self, name, value, attrs=None):
attrs['class'] = 'vManyToManyRawIdAdminField'
if value:
value = ','.join(value)
value = ','.join([str(v) for v in value])
else:
value = ""
return super(ManyToManyRawIdWidget, self).render(name, value, attrs)