mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 20:45:44 +00:00
[Testing] Fix docker build (#4109)
* Test fix for ongoing CI issues
(cherry picked from commit 3bf5492cb6
)
* Run docker test on PR (temporarily)
* Add token to unit testing env
* Add github token to env file
* Fix for github token
* Ignore blank tokens
* Don't run on PR
This commit is contained in:
@ -537,8 +537,11 @@ class APICallMixin:
|
||||
headers = {'Content-Type': 'application/json'}
|
||||
if getattr(self, 'API_TOKEN_SETTING'):
|
||||
token = self.get_setting(self.API_TOKEN_SETTING)
|
||||
headers[self.API_TOKEN] = token
|
||||
headers['Authorization'] = f"{self.API_TOKEN} {token}"
|
||||
|
||||
if token:
|
||||
headers[self.API_TOKEN] = token
|
||||
headers['Authorization'] = f"{self.API_TOKEN} {token}"
|
||||
|
||||
return headers
|
||||
|
||||
def api_build_url_args(self, arguments: dict) -> str:
|
||||
|
Reference in New Issue
Block a user