|
@@ -115,8 +115,13 @@ class ISPInfo(SingleInstanceMixin, models.Model):
|
|
|
|
|
|
@property
|
|
|
def main_chat_verbose(self):
|
|
|
- m = utils.re_chat_url.match(self.chatroom_set.first().url)
|
|
|
- return '{channel} sur {server}'.format(**(m.groupdict()))
|
|
|
+ first_chatroom = self.chatroom_set.first()
|
|
|
+ if first_chatroom:
|
|
|
+ m = utils.re_chat_url.match(first_chatroom.url)
|
|
|
+ if m:
|
|
|
+ return '{channel} sur {server}'.format(**(m.groupdict()))
|
|
|
+
|
|
|
+ return None
|
|
|
|
|
|
def get_absolute_url(self):
|
|
|
return '/isp.json'
|