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:
parent
3534c4cf39
commit
709f801877
@ -98,8 +98,8 @@ class ManyToManyRawIdWidget(ForeignKeyRawIdWidget):
|
|||||||
|
|
||||||
def render(self, name, value, attrs=None):
|
def render(self, name, value, attrs=None):
|
||||||
attrs['class'] = 'vManyToManyRawIdAdminField'
|
attrs['class'] = 'vManyToManyRawIdAdminField'
|
||||||
if value:
|
if value:
|
||||||
value = ','.join(value)
|
value = ','.join([str(v) for v in value])
|
||||||
else:
|
else:
|
||||||
value = ""
|
value = ""
|
||||||
return super(ManyToManyRawIdWidget, self).render(name, value, attrs)
|
return super(ManyToManyRawIdWidget, self).render(name, value, attrs)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user