Skip to content

Commit

Permalink
try to fix home error
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastienReuiller committed Jan 17, 2025
1 parent c117e8d commit 06c3cd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content_manager/templatetags/wagtail_dsfr_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def mega_menu(context: Context, parent_menu_id: int) -> dict:
"""
menu = MegaMenu.objects.filter(parent_menu_item_id=parent_menu_id).first()

return {"request": context["request"], "menu": menu}
return {"request": context["request"] if "request" in context else None, "menu": menu}


@register.simple_tag
Expand Down

0 comments on commit 06c3cd8

Please sign in to comment.