Leaklens

django__django-11551

admin.E108 is raised on fields accessible only via instance.

Verdict: the fix is stated in the issue (Tier A).

The following code exhibits the correct behaviour in all cases. The key changes are there is no longer a check for hasattr(model, item), as that being false should not prevent us form attempting to get the field via get_field, and only return an E108 in the case both of them fail.

The text states the fix: “The following code exhibits the correct behaviour in all cases. The key changes are there is no longer a check for hasattr(model, item), as that being false should not p…”

All SWE-bench Verified tasks · more django/django tasks · How the check works