Search hostname instead of site object

This commit is contained in:
PCoder 2024-07-19 14:03:53 +05:30
parent a68dcb7574
commit 31a0a6b060

View file

@ -93,7 +93,7 @@ def menuitems_children(parent, context=None):
if context:
request = context['request']
site = Site.find_for_request(request)
if site in ['sphc.ch', 'public-health.ch']:
if site.hostname in ['sphc.ch', 'public-health.ch']:
print("site is %s, add terms and conditions to footer" % site.hostname)
# custom page here is the terms and conditions page for public-health.ch and sphc.ch (common)
custom_page_id = 994