diff --git a/libraries/views.py b/libraries/views.py index 94c9c84c..4c111470 100644 --- a/libraries/views.py +++ b/libraries/views.py @@ -265,9 +265,9 @@ def get_context_data(self, **kwargs): context["maintainers"] = self.get_maintainers(context["version"]) context["author_tag"] = self.get_author_tag() exclude_maintainer_ids = [ - getattr(x.commitauthor, "id") + x.commitauthor.id for x in context["maintainers"] - if x.commitauthor + if getattr(x.commitauthor, 'id', None) ] context["top_contributors_release"] = self.get_top_contributors( version=context["version"], @@ -431,7 +431,10 @@ def get_maintainers(self, version): if author_email := commit_authors.get(user.email.lower(), None): user.commitauthor = author_email.author else: - user.commitauthor = None + user.commitauthor = { + "github_profile_url": "", + "avatar_url": "", + } return qs def get_top_contributors(self, version=None, exclude=None): diff --git a/templates/admin/library_report_detail.html b/templates/admin/library_report_detail.html index 1745907f..3c3fcd3f 100644 --- a/templates/admin/library_report_detail.html +++ b/templates/admin/library_report_detail.html @@ -1,4 +1,4 @@ -{% load static humanize %} +{% load static humanize avatar_tags %}
@@ -65,14 +65,8 @@