Opened 18 years ago

Closed 17 years ago

#4696 closed (fixed)

[newforms-admin] site.register reports a wrong error message

Reported by: Honza Král <Honza.Kral@…> Owned by: Adrian Holovaty
Component: contrib.admin Version: newforms-admin
Severity: Keywords: register AlreadyRegistered
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

whe you do site.register on a model that has already been registered with the site, you get

AlreadyRegistered: The model ModelBase is already registered

It is always ModelBase since the code says (sites.py:76)

raise AlreadyRegistered('The model %s is already registered' % model.__class__.__name__)

insted of

raise AlreadyRegistered('The model %s is already registered' % model.__name__)

Change History (1)

comment:1 by Adrian Holovaty, 17 years ago

Resolution: fixed
Status: newclosed

(In [5595]) newforms-admin: Fixed #4696 -- Fixed incorrect error message for AdminSite.register() and AdminSite.unregister(). Thanks, Honza Kral

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