2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-15 03:25:42 +00:00

Test fix for ongoing CI issues

This commit is contained in:
Oliver
2022-12-22 13:51:07 +11:00
parent 00be092a77
commit 3bf5492cb6

View File

@ -536,7 +536,9 @@ class APICallMixin:
"""
headers = {'Content-Type': 'application/json'}
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
def api_build_url_args(self, arguments: dict) -> str: