mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06: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
1 changed files with 8 additions and 7 deletions
|
@ -153,13 +153,14 @@ class AuthorizationHelpers:
|
|||
failed_callback()
|
||||
return
|
||||
|
||||
success_callback(UserProfile(
|
||||
user_id = profile_data["user_id"],
|
||||
username = profile_data["username"],
|
||||
profile_image_url = profile_data.get("profile_image_url", ""),
|
||||
organization_id = profile_data.get("organization", {}).get("organization_id"),
|
||||
subscriptions = profile_data.get("subscriptions", [])
|
||||
))
|
||||
if success_callback is not None:
|
||||
success_callback(UserProfile(
|
||||
user_id = profile_data["user_id"],
|
||||
username = profile_data["username"],
|
||||
profile_image_url = profile_data.get("profile_image_url", ""),
|
||||
organization_id = profile_data.get("organization", {}).get("organization_id"),
|
||||
subscriptions = profile_data.get("subscriptions", [])
|
||||
))
|
||||
|
||||
@staticmethod
|
||||
def generateVerificationCode(code_length: int = 32) -> str:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue