Opened 4 years ago

Last modified 4 years ago

#32035 closed Bug

AbstractUser.clean assumes default manager is named objects — at Initial Version

Reported by: Ben Brooks Owned by: nobody
Component: contrib.auth Version: 3.1
Severity: Normal Keywords:
Cc: ben@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

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.

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top