Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 years ago

#8519 closed (fixed)

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

Reported by: 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 mattmcc 6 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 6 years ago by 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 6 years ago by mattmcc

comment:2 Changed 6 years ago by mattmcc

  • Has patch set
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:3 Changed 6 years ago by jacob

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

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

comment:4 Changed 3 years ago by jacob

  • milestone 1.0 deleted

Milestone 1.0 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.