Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#25984 closed Cleanup/optimization (fixed)

Incorrect error message in ModelBase.__new__

Reported by: Marten Kenbeek Owned by: nobody
Component: Database layer (models, ORM) Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description (last modified by Marten Kenbeek)

The RuntimeError in ModelBase.__new__ says:

... or else was imported before its application was loaded.

In 1.9 all applications have to be loaded before you can import any models, otherwise an AppRegistryNotReady exception is raised before this error is reached. This error is only reached if the app is not in INSTALLED_APPS. The message should be changed to reflect that.

Change History (5)

comment:1 by Marten Kenbeek, 8 years ago

Description: modified (diff)

comment:2 by Tim Graham, 8 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Varun Sharma, 8 years ago

Has patch: set

comment:4 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: newclosed

In 692d0558:

Fixed #25984 -- Corrected RuntimeError message in ModelBase.new().

comment:5 by Tim Graham <timograham@…>, 8 years ago

In dc1ef0f:

[1.9.x] Fixed #25984 -- Corrected RuntimeError message in ModelBase.new().

Backport of 692d05589061a593d4bfbdb2895eaef0386eca34 from master

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