From 0ce4dca799fcd23fa8f295a5ae4b9386f4b0030e Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Tue, 12 Feb 2019 10:27:24 +0000 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20allow=20domains=20to=20be=20non?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/utils.py b/app/utils.py index c7ed47090..dc3713743 100644 --- a/app/utils.py +++ b/app/utils.py @@ -563,7 +563,10 @@ class AgreementInfo: def _get_info(self): - details = self.domains.get(self._match) or {} + details = self.domains.get(self._match) + + if isinstance(details, None): + raise TypeError('Domain must have details ({})'.format(self._match)) if isinstance(details, str): self.is_canonical = False