Friday, August 31, 2018

System check Framework error checking Admin Fieldsets in 2.1

This Field set definition:

    fieldsets = (
       
('Job Work Sheet', {
           
'fields': (
                   
('number', 'job_history', 'hw_customer',),
                   
('status', 'contracted_out',),
                   
('adn_parts_required', 'atn_required', 'atn_tech', 'cancel_job',),
                   
('date_quoted', 'po_number', 'tag',),
                   
('date_in', 'priority',),
                   
('hw_description', 'hw_make', 'hw_model', 'hw_serial', ),
                   
('technician', 'bin', ),
                   
('assessment_time', 'hours_worked',),
                   
('parts_cost', 'parts_shipping',),
                   
('problem',),
               
)
       
}),
       
('Hardware Details', {
           
'classes': ('grp-collapse grp-closed',),
           
'fields': (('hw_customer', 'hardware', ), ('hw_description', 'hw_make', 'hw_model', 'hw_serial',), ('hw_comments',),)
       
}),
       
('Repair Details', {
           
'fields': (('work_done',), ('comments',),)
       
}),
   
)

Gets no errors with Django 2.0.6, but with 2.1 I get:

(dj21py37) $ ./manage.py check
SystemCheckError: System check identified some issues:

ERRORS:
<class 'repair.admin.JobAdmin'>: (admin.E012) There are duplicate field(s) in 'fieldsets[1][1]'.
<class 'repair.admin.JobAdmin'>: (admin.E012) There are duplicate field(s) in 'fieldsets[2][1]'.

System check identified 2 issues (0 silenced).



I presume its complaining about the field 'hw_customer', but since it is in readonly_fields this should not be an error, correct?

Rich.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5c78dd4e-d86a-4367-8c09-de2c34773f69%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment