Check that the headers are actually provided.
This commit is contained in:
parent
87c2a5bc97
commit
5d309af86f
|
@ -79,7 +79,7 @@ class Request(dict):
|
|||
:return: token related to request
|
||||
"""
|
||||
auth_header = self.headers.get('Authorization')
|
||||
if 'Token ' in auth_header:
|
||||
if auth_header is not None and 'Token ' in auth_header:
|
||||
return auth_header.partition('Token ')[-1]
|
||||
else:
|
||||
return auth_header
|
||||
|
|
Loading…
Reference in New Issue
Block a user