From dff0affd42a460d7ffd51b31da450a894c0187dc Mon Sep 17 00:00:00 2001 From: George Katsikas <giorgakis.katsikas@gmail.com> Date: Fri, 8 Mar 2024 13:56:56 +0100 Subject: [PATCH] fix accessing contributor details with no profile --- scipost_django/scipost/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scipost_django/scipost/views.py b/scipost_django/scipost/views.py index 4a78cd34d..e499e2c95 100644 --- a/scipost_django/scipost/views.py +++ b/scipost_django/scipost/views.py @@ -1522,7 +1522,9 @@ def contributor_info(request, contributor_id): ) ) - contributor_publications = contributor.profile.publications() + contributor_publications = [] + if profile := contributor.profile: + contributor_publications = profile.publications().published() contributor_submissions = Submission.objects.public_listed().filter( authors=contributor ) -- GitLab