mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix typing.
part of CURA-8138
This commit is contained in:
parent
c78618bc15
commit
6f99837db5
1 changed files with 2 additions and 1 deletions
|
@ -58,7 +58,7 @@ class DigitalFactoryApiClient:
|
|||
|
||||
self._projects_pagination_mgr = PaginationManager(limit = projects_limit_per_page) if projects_limit_per_page else None # type: Optional[PaginationManager]
|
||||
|
||||
def checkUserHasAccess(self, callback: Callable) -> bool:
|
||||
def checkUserHasAccess(self, callback: Callable) -> None:
|
||||
"""Checks if the user has any sort of access to the digital library.
|
||||
A user is considered to have access if the max-# of private projects is greater then 0 (or -1 for unlimited).
|
||||
"""
|
||||
|
@ -66,6 +66,7 @@ class DigitalFactoryApiClient:
|
|||
def callbackWrap(response: Optional[Any] = None, *args, **kwargs) -> None:
|
||||
if response and isinstance(response, DigitalFactoryFeatureBudgetResponse):
|
||||
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 > 0)
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue