fix error-type to use custom errors

This commit is contained in:
Matthias 2022-05-15 04:12:57 +02:00
parent 025c6f9b82
commit b0439267ea
No known key found for this signature in database
GPG Key ID: AB6D0E6C4CB65093

View File

@ -433,9 +433,9 @@ class APICallMixin:
def has_api_call(self):
"""Is the mixin ready to call external APIs?"""
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):
raise ValueError("API_TOKEN_SETTING must be defined")
raise MixinNotImplementedError("API_TOKEN_SETTING must be defined")
return True
@property