mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-05-20 10:34:30 +00:00
minetest: Fix duplicate domain names being displayed in UI
Fixes #1330 Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
parent
ee627be02e
commit
f7f3b2d8a3
@ -49,9 +49,9 @@ class MinetestServiceView(ServiceView): # pylint: disable=too-many-ancestors
|
|||||||
def get_context_data(self, *args, **kwargs):
|
def get_context_data(self, *args, **kwargs):
|
||||||
"""Add service to the context data."""
|
"""Add service to the context data."""
|
||||||
context = super().get_context_data(*args, **kwargs)
|
context = super().get_context_data(*args, **kwargs)
|
||||||
domains = [
|
# Filter out onion addresses and get a unique list of domains
|
||||||
domain for domains in names.domains.values() for domain in domains
|
domains = set(domain for domains in names.domains.values()
|
||||||
]
|
for domain in domains if not domain.endswith('.onion'))
|
||||||
context['domains'] = domains
|
context['domains'] = domains
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user