#29636: Failing admin.E108 system check in 2.1 -------------------------------------+------------------------------------- Reporter: Petr Boros | Owner: nobody Type: Bug | Status: new Component: Core (System | Version: 2.1 checks) | Severity: Normal | Resolution: Keywords: SystemCheckError | Triage Stage: | Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+-------------------------------------
Comment (by Petr Boros): I investigated Django source code and believe this is a regression introduced in commit `47016ad` (https://github.com/django/django/commit/47016adbf54b54143d4cf052eeb29fc72d27e6b1), specifically in the `else` branch starting on line `673`. This is the current code present in 2.1: {{{ else: return [ checks.Error( "The value of '%s' refers to '%s', which is not a callable, " "an attribute of '%s', or an attribute or method on '%s.%s'." % ( label, item, obj.__class__.__name__, model._meta.app_label, model._meta.object_name, ), obj=obj.__class__, id='admin.E108', ) ] }}} I modified it to match the original code before the alleged regression, that is: {{{ else: try: model._meta.get_field(item) except FieldDoesNotExist: return [ checks.Error( "The value of '%s' refers to '%s', which is not a callable, " "an attribute of '%s', or an attribute or method on '%s.%s'." % ( label, item, obj.__class__.__name__, model._meta.app_label, model._meta.object_name, ), obj=obj.__class__, id='admin.E108', ) ] else: return [] }}} and the checks are not failing. If this is indeed an unintended regression, I'd be happy to submit a PR. -- Ticket URL: <https://code.djangoproject.com/ticket/29636#comment:3> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.9b7874c7435251b0bc09fcf0259ba32d%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.