mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 15:44:04 -06: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
1 changed files with 1 additions and 1 deletions
|
@ -118,7 +118,7 @@ class AuthorizationHelpers:
|
||||||
check_token_url,
|
check_token_url,
|
||||||
headers_dict = headers,
|
headers_dict = headers,
|
||||||
callback = lambda reply: self._parseUserProfile(reply, success_callback, failed_callback),
|
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:
|
def _parseUserProfile(self, reply: QNetworkReply, success_callback: Optional[Callable[[UserProfile], None]], failed_callback: Optional[Callable[[], None]] = None) -> None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue