Opened 8 years ago

Closed 8 years ago

Last modified 5 years ago

#8519 closed (fixed)

databrowse.site.register reports "The model ModelBase is already registered" instead of naming the actual model

Reported by: Luciano Ramalho Owned by: nobody
Component: contrib.databrowse Version: 1.0-beta
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

This is another manifestation of bug #4696, but in a different piece of code.

django.contrib.databrowse.site, in function register (line 92) is:

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

should be:

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

Attachments (1)

8519-1.diff (1.1 KB) - added by Matt McClanahan 8 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 8 years ago by Luciano Ramalho

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

BTW, I just noticed that the same problem existis a few lines below in the same source code file, django.contrib.databrowse.site, but in function unregister (line 105):

                raise NotRegistered('The model %s is not registered' % model.__class__.__name__)

shoul be

                raise NotRegistered('The model %s is not registered' % model.__name__)

Changed 8 years ago by Matt McClanahan

Attachment: 8519-1.diff added

comment:2 Changed 8 years ago by Matt McClanahan

Has patch: set
Triage Stage: UnreviewedReady for checkin

comment:3 Changed 8 years ago by Jacob

Resolution: fixed
Status: newclosed

(In [8547]) Fixed #8519: report the correct class in databrowse's AlreadyRegistered error. Thanks, mattmcc.

comment:4 Changed 5 years ago by Jacob

milestone: 1.0

Milestone 1.0 deleted

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