Skip to content

Commit

Permalink
fix(templatetags): limit menu visibility + missing page id key = crash (
Browse files Browse the repository at this point in the history
#55)

Copied from TACC/Core-CMS#571.
  • Loading branch information
wesleyboar committed Jun 21, 2023
1 parent 501b61a commit 59d3e00
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def limit_visibility_in_menu(context, menu_item):
"""
request = context['request']
user = request.user
page_id = menu_item.attr['reverse_id']
has_page_id = ('reverse_id' in menu_item.attr)
page_id = menu_item.attr['reverse_id'] if has_page_id else ''

if (
user.is_superuser or
Expand Down

0 comments on commit 59d3e00

Please sign in to comment.