Opened 8 years ago

Closed 8 years ago

#4696 closed (fixed)

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

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

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 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(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