diff --git a/django/contrib/admin/models.py b/django/contrib/admin/models.py index dbc5ca2c79..7bcb08dbd7 100644 --- a/django/contrib/admin/models.py +++ b/django/contrib/admin/models.py @@ -166,7 +166,9 @@ class LogEntry(models.Model): if not self.content_type: return self.get_admin_url() - view_permission_name = f"{self.content_type.app_label}.view_{self.content_type.model}" + view_permission_name = ( + f"{self.content_type.app_label}.view_{self.content_type.model}" + ) if self.user.has_perm(view_permission_name): return self.get_admin_url()