mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-07-22 11:59:33 +00:00
ejabberd: Handle case where domain name is not set
Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
parent
aaee9ec8a9
commit
baa5a12c62
@ -47,7 +47,8 @@ class EjabberdAppView(AppView):
|
||||
def get_context_data(self, *args, **kwargs):
|
||||
"""Add service to the context data."""
|
||||
context = super().get_context_data(*args, **kwargs)
|
||||
context['domainname'] = ejabberd.get_domains()[0]
|
||||
domains = ejabberd.get_domains()
|
||||
context['domainname'] = domains[0] if domains else None
|
||||
context['clients'] = ejabberd.clients
|
||||
return context
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user