mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 03:38:59 +08:00
Fix call to failed_callback
It provides 2 arguments (reply and error) which we both ignore and proceed to call failed_callback. And failed_callback may also be None in which case we don't call anything. Contributes to issue CURA-8539.
This commit is contained in:
parent
9895015235
commit
ffb891fb69
@ -118,7 +118,7 @@ class AuthorizationHelpers:
|
||||
check_token_url,
|
||||
headers_dict = headers,
|
||||
callback = lambda reply: self._parseUserProfile(reply, success_callback, failed_callback),
|
||||
error_callback = lambda _: failed_callback()
|
||||
error_callback = lambda _, _2: failed_callback() if failed_callback is not None else None
|
||||
)
|
||||
|
||||
def _parseUserProfile(self, reply: QNetworkReply, success_callback: Optional[Callable[[UserProfile], None]], failed_callback: Optional[Callable[[], None]] = None) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user