2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 11:35:41 +00:00

Test fix for ongoing CI issues (#4107)

(cherry picked from commit 3bf5492cb6)
This commit is contained in:
Oliver
2022-12-25 06:39:14 +11:00
committed by GitHub
parent e1d1b51936
commit 07e4f39dc7

View File

@ -536,7 +536,9 @@ class APICallMixin:
""" """
headers = {'Content-Type': 'application/json'} headers = {'Content-Type': 'application/json'}
if getattr(self, 'API_TOKEN_SETTING'): if getattr(self, 'API_TOKEN_SETTING'):
headers[self.API_TOKEN] = self.get_setting(self.API_TOKEN_SETTING) token = self.get_setting(self.API_TOKEN_SETTING)
headers[self.API_TOKEN] = token
headers['Authorization'] = f"{self.API_TOKEN} {token}"
return headers return headers
def api_build_url_args(self, arguments: dict) -> str: def api_build_url_args(self, arguments: dict) -> str: