Opened 9 years ago

Closed 9 years ago

#3219 closed defect (wontfix)

Invalid admin attribute should not cause a metaclass error

Reported by: Robert Myers <myer0052@…> Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: myer0052@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

When a invalid admin attribute is used a metaclass error is raised.

Example:

    class BadAdminOption(models.Model):
        name = models.CharField(maxlength=30)
    
        class Admin:
            nonexistent = 'option'

Expecting Error::

    "admin" attribute, if given, must be set to a models.AdminOptions() instance.

Actual Error::

    Error when calling the metaclass bases
    __init__() got an unexpected keyword argument 'nonexistent'

Change History (2)

comment:1 Changed 9 years ago by Robert Myers <myer0052@…>

Should be closed as wontfix since the newadmin will not be using AdminOptions() any more.

comment:2 Changed 9 years ago by Robert Myers <myer0052@…>

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

Since this is about to change there is no need to fix this ticket, the newforms-admin branch will correct this error.

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