Skip to content

Commit

Permalink
fix rare case bot traffic cause 500
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name authored and alphatownsman committed Apr 8, 2024
1 parent 5ef23d6 commit f4b85e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions catalog/search/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def fetch(request, url, is_refetch: bool = False, site: AbstractSite | None = No


def visible_categories(request):
if not hasattr(request, "user"):
return []
vc = request.session.get("p_categories", None)
if vc is None:
vc = [
Expand Down

0 comments on commit f4b85e2

Please sign in to comment.