Appease type-checking system even further.

That last one should have worked really.

part of CURA-8138
This commit is contained in:
Remco Burema 2021-07-09 21:36:20 +02:00
parent 6f99837db5
commit 85f98bdaff
No known key found for this signature in database
GPG key ID: 215C49431D43F98C

View file

@ -64,9 +64,9 @@ class DigitalFactoryApiClient:
""" """
def callbackWrap(response: Optional[Any] = None, *args, **kwargs) -> None: def callbackWrap(response: Optional[Any] = None, *args, **kwargs) -> None:
if response and isinstance(response, DigitalFactoryFeatureBudgetResponse): if (response is not None and isinstance(response, DigitalFactoryFeatureBudgetResponse) and
response.library_max_private_projects is not None):
callback( callback(
response.library_max_private_projects is not None and
response.library_max_private_projects == -1 or # Note: -1 is unlimited response.library_max_private_projects == -1 or # Note: -1 is unlimited
response.library_max_private_projects > 0) response.library_max_private_projects > 0)
else: else: