From b0f9978a95eae0052f90667278fb798401f1f9b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20Caux?= <git@jscaux.org> Date: Mon, 24 Jan 2022 06:44:50 +0100 Subject: [PATCH] Tweak Profile roles. Fixes SCIPOST-1EB --- scipost_django/profiles/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scipost_django/profiles/models.py b/scipost_django/profiles/models.py index 9a16ac549..9b05690c2 100644 --- a/scipost_django/profiles/models.py +++ b/scipost_django/profiles/models.py @@ -89,7 +89,7 @@ class Profile(models.Model): def roles(self): try: return self.contributor.roles - except Contributor.DoesNotExist: + except KeyError, Contributor.DoesNotExist: return None def __str__(self): -- GitLab