Skip to content

Commit

Permalink
add temp fix in context processor for resolver match
Browse files Browse the repository at this point in the history
  • Loading branch information
CJGutz committed Apr 3, 2024
1 parent 7e08827 commit 655d511
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion website/context_processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ def banner_context(request):
should_show = False
for site in banner.site.split(","):
site_pattern = re.compile(site.replace("*", ".*"))
if site_pattern.match(request.resolver_match.view_name):
if request.resolver_match and site_pattern.match(
request.resolver_match.view_name
):
should_show = True
break

Expand Down

0 comments on commit 655d511

Please sign in to comment.