Typing: When the user profile changes, it may also become None

This happens when logging out.

Contributes to issue CURA-8539.
This commit is contained in:
Ghostkeeper 2021-11-22 16:30:03 +01:00
parent 0196fd54ea
commit 1cdeb7d56b
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -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()