#13149: ForeignKeyRawIdWidget doesn't handle invalid values
-------------------------------------------+--------------------------------
Reporter: acdha | Owner: nobody
Status: new | Milestone:
Component: django.contrib.admin | Version: 1.2
Resolution: | Keywords: raw_id_fields
Stage: Accepted | Has_patch: 1
Needs_docs: 0 | Needs_tests: 1
Needs_better_patch: 1 |
-------------------------------------------+--------------------------------
Comment (by acdha):
A similar problem happens if someone enters a non-ascii values in a raw id
field:
{{{
@@ -169,7 +169,7 @@ class ManyToManyRawIdWidget(ForeignKeyRawIdWidget):
def render(self, name, value, attrs=None):
attrs['class'] = 'vManyToManyRawIdAdminField'
if value:
- value = ','.join([str(v) for v in value])
+ value = ','.join([unicode(v) for v in value])
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/13149#comment:6>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
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.