mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix middleware due to failing tests
This commit is contained in:
parent
8b61acb048
commit
2d3e7e35af
@ -63,7 +63,7 @@ class AuthRequiredMiddleware(object):
|
||||
|
||||
# No authorization was found for the request
|
||||
if not authorized:
|
||||
if not request.path_info == reverse_lazy('login') and not request.path_info == '/api/':
|
||||
if not request.path_info == reverse_lazy('login') and not request.path_info.startswith('/api/'):
|
||||
return HttpResponseRedirect(reverse_lazy('login'))
|
||||
|
||||
# Code to be executed for each request/response after
|
||||
|
Loading…
Reference in New Issue
Block a user