#29782: Better error message when filtering users with AnonymousUser
-------------------------------------+-------------------------------------
Reporter: Sveder | Owner: Ramon
Type: | Saraiva
Cleanup/optimization | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Ramon Saraiva):
Still trying to understand what piece of code would be responsible for
this behaviour.
I wonder if overwriting `AnonymousUser`'s `__int__` would be too naive?
Since `AnonymousUser` is not inheriting from `Model`, it happens that its
instance is passed all the way over to the field `get_prep_value` and then
`int(value -> AnonymousUser)` is called.
Any guidance/idea about what should be responsible for doing this
validation?
--
Ticket URL: <https://code.djangoproject.com/ticket/29782#comment:3>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.41dfb6f8ff6d0e212e8264f537203730%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.