#32035: AbstractUser.clean assumes default manager is named objects
-------------------------------+--------------------------------------
Reporter: ben-bitdotio | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 3.1
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------------------------
Description changed by ben-bitdotio:
Old description:
> From Managers documentation, "If you’re writing some code that must
> handle an unknown model, for example, in a third-party app that
> implements a generic view, use this manager (or _base_manager) rather
> than assuming the model has an objects manager."
>
> Our third-party app implements a generic view (with objects = None) and
> set the default manager to be something else. When making calls to
> inherited methods, we run into NoneType errors due to normalize_email()
> implementation. The associated PR replaces objects with _default_manager
> to allow for the generic view implementation.
New description:
From Managers documentation
(https://docs.djangoproject.com/en/3.1/topics/db/managers/), "If you’re
writing some code that must handle an unknown model, for example, in a
third-party app that implements a generic view, use this manager (or
_base_manager) rather than assuming the model has an objects manager."
Our third-party app implements a generic view (with objects = None) and
set the default manager to be something else. When making calls to
inherited methods, we run into NoneType errors due to normalize_email()
implementation. The associated PR replaces objects with _default_manager
to allow for the generic view implementation.
--
--
Ticket URL: <https://code.djangoproject.com/ticket/32035#comment:1>
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/070.24fce1e127221bb0fa14e96cb45eea90%40djangoproject.com.