mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
added a check for the required constants
This commit is contained in:
parent
31d587a9b1
commit
e889f487f0
@ -368,7 +368,10 @@ class APICallMixin:
|
||||
@property
|
||||
def has_api_call(self):
|
||||
"""Is the mixin ready to call external APIs?"""
|
||||
# TODO check if settings are set
|
||||
if not bool(self.API_URL_SETTING):
|
||||
raise ValueError("API_URL_SETTING must be defined")
|
||||
if not bool(self.API_TOKEN_SETTING):
|
||||
raise ValueError("API_TOKEN_SETTING must be defined")
|
||||
return True
|
||||
|
||||
@property
|
||||
|
Loading…
Reference in New Issue
Block a user