Opened 6 years ago

Last modified 6 years ago

#29636 closed Bug

Failing admin.E108 system check after upgrading to Django 2.1 — at Initial Version

Reported by: Petr Boros Owned by: nobody
Component: contrib.admin Version: 2.1
Severity: Normal Keywords: SystemCheckError
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

After upgrading to Django 2.1, we have system checks failing due to admin.E108 SystemCheckError. This behavior was not present in Django 2.0.8. I don't see any relevant API change documented in the 2.1 Release notes, therefore I'm filling this as a bug.

The error:

<class 'automation.admin.TriggerAdmin'>: (admin.E108) The value of 'list_display[3]' refers to 'position', which is not a callable, an attribute of 'TriggerAdmin', or an attribute or method on 'automation.Trigger'.

The automation.admin.TriggerAdmin class:

from django.contrib import admin
from automation.models import Trigger

@admin.register(Trigger)
class TriggerAdmin(admin.ModelAdmin):
    model = Trigger
    list_display = ('company', 'trigger_type', 'action_type', 'position')
    list_filter = ('company', 'trigger_type', 'action_type')

The automation.models.Trigger model (abbreviated):

from django.db import models
from core.fields import PositionField

class Trigger(models.Model):
    position = PositionField(
        verbose_name=_('Priority'),
        collection='company'
    )

    (...)

The core.fields.PositionField field (abbreviated, originally taken from the django-positions package):

from django.db import models

class PositionField(models.IntegerField):
    (...)

Change History (0)

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