mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-13 11:13:16 +08:00
Only call success_callback if it's not None
It could also be called as a fire-and-forget update thing. Contributes to issue CURA-8539.
This commit is contained in:
parent
595a6580f5
commit
1ee9f73075
@ -153,13 +153,14 @@ class AuthorizationHelpers:
|
|||||||
failed_callback()
|
failed_callback()
|
||||||
return
|
return
|
||||||
|
|
||||||
success_callback(UserProfile(
|
if success_callback is not None:
|
||||||
user_id = profile_data["user_id"],
|
success_callback(UserProfile(
|
||||||
username = profile_data["username"],
|
user_id = profile_data["user_id"],
|
||||||
profile_image_url = profile_data.get("profile_image_url", ""),
|
username = profile_data["username"],
|
||||||
organization_id = profile_data.get("organization", {}).get("organization_id"),
|
profile_image_url = profile_data.get("profile_image_url", ""),
|
||||||
subscriptions = profile_data.get("subscriptions", [])
|
organization_id = profile_data.get("organization", {}).get("organization_id"),
|
||||||
))
|
subscriptions = profile_data.get("subscriptions", [])
|
||||||
|
))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def generateVerificationCode(code_length: int = 32) -> str:
|
def generateVerificationCode(code_length: int = 32) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user