#26823: auth signal receiver update_last_login not compatible with custom user
models that have no last_login field
------------------------------+------------------------------------
Reporter: hjwp | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
------------------------------+------------------------------------
Changes (by timgraham):
* stage: Unreviewed => Accepted
Comment:
An alternative implementation I thought of would be to introspect the user
model and see if it has a `last_login` field and avoid connecting the
signal if not. I'm not sure it's feasible with
`user_logged_in.connect(update_last_login)` at the module level since
`get_user_model()` can't be called there, but maybe if the signal
connecting happened in `AuthConfig.ready()` that could work?
--
Ticket URL: <https://code.djangoproject.com/ticket/26823#comment:4>
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/062.6cd0964fc3fa2bd65bb2d2c4b450258d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.