From 30bb572589fcd9fdc0e48be612cea0b3ea73b693 Mon Sep 17 00:00:00 2001 From: Santiago Lamora Date: Tue, 8 Jun 2021 10:43:49 +0200 Subject: [PATCH] Handle Mailinglist without domain address --- musician/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/musician/models.py b/musician/models.py index 3239829..93e3d29 100644 --- a/musician/models.py +++ b/musician/models.py @@ -301,7 +301,10 @@ class MailinglistService(OrchestraModel): @property def address_name(self): - return "{}@{}".format(self.data['address_name'], self.data['address_domain']['name']) + address_domain = self.data['address_domain'] + if address_domain is None: + return self.data['address_name'] + return "{}@{}".format(self.data['address_name'], address_domain['name']) @property def manager_url(self):