mirror of
https://github.com/inventree/InvenTree.git
synced 2025-05-02 21:38:48 +00:00
fix error-type to use custom errors
This commit is contained in:
parent
025c6f9b82
commit
b0439267ea
@ -433,9 +433,9 @@ class APICallMixin:
|
|||||||
def has_api_call(self):
|
def has_api_call(self):
|
||||||
"""Is the mixin ready to call external APIs?"""
|
"""Is the mixin ready to call external APIs?"""
|
||||||
if not bool(self.API_URL_SETTING):
|
if not bool(self.API_URL_SETTING):
|
||||||
raise ValueError("API_URL_SETTING must be defined")
|
raise MixinNotImplementedError("API_URL_SETTING must be defined")
|
||||||
if not bool(self.API_TOKEN_SETTING):
|
if not bool(self.API_TOKEN_SETTING):
|
||||||
raise ValueError("API_TOKEN_SETTING must be defined")
|
raise MixinNotImplementedError("API_TOKEN_SETTING must be defined")
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
Loading…
x
Reference in New Issue
Block a user