#30941: hasattr(request, '_cached_user') check no longer works
---------------------------------+------------------------------------
Reporter: Collin Anderson | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: master
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Comment (by Collin Anderson):
Actually, yeah, the more and more I look over the code search results. I
might be one of the few that's actually broken by this. I couldn't find
any examples of other projects breaking.
In most of these cases, they just copied and pasted Django's get_user()
logic (_replacing_ django's logic), including Carlton's example. And I
don't think their code would break from this change.
So I'd be in favor of closing and just seeing if anyone else runs into the
same issue. It's my fault for using undocumented code. I can just check
`request.session.accessed` instead or switch to checking
`request.user._wrapped`. If there's a better way to do it, I'll just
switch to that.
--
Ticket URL: <https://code.djangoproject.com/ticket/30941#comment:12>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/072.bbad137ce92be2cd7596566b48103647%40djangoproject.com.