# HG changeset patch
# User tyrion
# Date 1285855227 -7200
# Node ID 3e9be9623c609616b53e56e47b703d6d1506096a
# Parent 203bd55e900832f6b6ced8e7499eabe26e43d06b
Setting ManyToManyRawIdWidget.render `attrs` param to an empty dict if it's None.
diff -r 203bd55e9008 -r 3e9be9623c60 django/contrib/admin/widgets.py
a
|
b
|
|
167 | 167 | super(ManyToManyRawIdWidget, self).__init__(rel, attrs, using=None) |
168 | 168 | |
169 | 169 | def render(self, name, value, attrs=None): |
| 170 | if attrs is None: |
| 171 | attrs = {} |
170 | 172 | attrs['class'] = 'vManyToManyRawIdAdminField' |
171 | 173 | if value: |
172 | 174 | value = ','.join([force_unicode(v) for v in value]) |