Tested while trying to access the "Usage" page for any image or document. The error seems to be the same in both cases. Usage counts for snippets seem to work as expected.
Error:
AttributeError /admin/documents/usage/{document_id}/
'GenericForeignKey' object has no attribute 'verbose_name'
Code (exception raised on last line) wagtail/models/reference_index.py in describe_source_field at line 491:
# ManyToOneRel (reverse accessor for ParentalKey) does not have a verbose name. So get the name of the child field instead
if isinstance(field, models.ManyToOneRel):
child_field = field.related_model._meta.get_field(model_path_components[2])
return capfirst(child_field.verbose_name)
else:
return capfirst(field.verbose_name)
Tested while trying to access the "Usage" page for any image or document. The error seems to be the same in both cases. Usage counts for snippets seem to work as expected.
Error:
Code (exception raised on last line)
wagtail/models/reference_index.py in describe_source_field at line 491
:Sentry issue (public link): https://sentry.io/share/issue/bc084fb45cf34d74ae938ed532c5e851/