#24089: Misleading error raised during system check related to ModelAdmin
--------------------------------------+--------------------
     Reporter:  okrutny               |      Owner:  nobody
         Type:  Cleanup/optimization  |     Status:  new
    Component:  contrib.admin         |    Version:  1.7
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 When comma is forgoten when defining fieldsets on ModelAdmin, wrong error
 is raised:

 ERRORS:
 <class 'fund_profiles.admin.OrganizationAdmin'>: (admin.E012) There are
 duplicate field(s) in 'fieldsets[0][1]'.

 Code to reproduce:

 {{{
 class OrganizationAdmin(admin.ModelAdmin):

     list_display = ('name','email',
 
'accepted_ads','accepted_rules','accepted_handling','date_created','date_modified')
     list_filter = ('verified','accepted_ads',)
     fieldsets = (
         (_('administration'),
          {
              'fields': ('removed')
          }),
     )
 }}}
 Adding comma to tuple after 'removed' fixes issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/24089>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/050.42e96b670a461c139be411b42f350c54%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to