From 1cdeb7d56b01cb1a5997874801628aa7195513fd Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 22 Nov 2021 16:30:03 +0100 Subject: [PATCH] Typing: When the user profile changes, it may also become None This happens when logging out. Contributes to issue CURA-8539. --- cura/API/Account.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/API/Account.py b/cura/API/Account.py index 94b28e7b64..fa42c3c44d 100644 --- a/cura/API/Account.py +++ b/cura/API/Account.py @@ -207,7 +207,7 @@ class Account(QObject): if self._update_timer.isActive(): self._update_timer.stop() - def _onProfileChanged(self, profile: UserProfile) -> None: + def _onProfileChanged(self, profile: Optional[UserProfile]) -> None: self._user_profile = profile self.userProfileChanged.emit()