Fixed the is_in_section filter to return False when there is no request object in the Mia core application.
This commit is contained in:
parent
28ee42792d
commit
71b4ee5184
@ -206,7 +206,7 @@ def is_in_section(request, section_name):
|
||||
bool: True if the request is currently in this section, or False
|
||||
otherwise
|
||||
"""
|
||||
if request.resolver_match is None:
|
||||
if request is None:
|
||||
return False
|
||||
view_name = request.resolver_match.view_name
|
||||
return view_name == section_name\
|
||||
|
Loading…
Reference in New Issue
Block a user