Don’t error if service without an organisation requests to go live

It was trying to look at `organisation.domains`, which caused an
`AttributeError` if there wasn’t an organisation.
This commit is contained in:
Chris Hill-Scott
2019-04-23 16:44:39 +01:00
parent 55a3a244d7
commit 9c846979be
2 changed files with 37 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ class Organisation(JSONModel):
super().__init__(_dict)
if self._dict == {}:
self.name, self.crown, self.agreement_signed = None, None, None
self.name, self.crown, self.agreement_signed, self.domains = None, None, None, []
def as_human_readable(self, fallback_domain):
if 'dwp.' in ''.join(self.domains):