Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#22652 closed Bug (fixed)

create_superuser in contrib.auth.management expects "objects" manager in 1.7b4

Reported by: Alex Laird Owned by: nobody
Component: contrib.auth Version: 1.7-beta-2
Severity: Release blocker Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

We installed Django 1.7b4 to test compatibility with my application and came upon what we believe to be a bug when running our regression tests.

In Django 1.6.5, contrib\auth\management\_init_.py line 116 referes 'created_models' in 'UserModel', but in Django 1.7 this appears to be modified (same file, line 132) to check if UserModel.objects.exists() not. However, we have renamed our user manager to simply "users", so this throws an errors when executed.

Change History (3)

comment:1 by Claude Paroz, 10 years ago

Component: Core (URLs)contrib.auth
Easy pickings: set
Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

I guess that simply replacing objects by _default_manager should solve this.

comment:2 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In b68fac7e88c08cd0bb3dde86388292ddc863eba5:

Fixed #22652 -- Replaced UserModel.objects with UserModel._default_manager.

Thanks alexdlaird for the report.

comment:3 by Tim Graham <timograham@…>, 10 years ago

In 1e78d132dad66cae93b94e3c854bcb4fd4b49b6e:

[1.7.x] Fixed #22652 -- Replaced UserModel.objects with UserModel._default_manager.

Thanks alexdlaird for the report.

Backport of b68fac7e88 from master

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