Opened 17 years ago
Last modified 17 years ago
#4472 closed
[unicode] Cannot coerce AnonymousUser to unicode — at Initial Version
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Contrib apps | Version: | other branch |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
smart_unicode and force_unciode throw TypeError exception when calling on instance of AnonymousUser. I got this error when trying something like this ( for model Articles.authors = ManyToManyField(User) ):
from django.contrib.auth import AnonyousUser auser = AnonymousUser() Article.objects.filter( authors__in = [auser] )
Then i got:
TypeError: coercing to Unicode: need string or buffer, proxy found
Full trackback is in attachment.
Note:
See TracTickets
for help on using tickets.