mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 06:45:09 -06:00
Fix refactor and tests
This commit is contained in:
parent
6e46772170
commit
3a01b63343
3 changed files with 17 additions and 10 deletions
|
@ -23,7 +23,7 @@ class BackupsManager:
|
|||
# containing some metadata (like version).
|
||||
def createBackup(self) -> Tuple[Optional[bytes], Optional[Dict[str, str]]]:
|
||||
self._disableAutoSave()
|
||||
backup = Backup()
|
||||
backup = Backup(self._application)
|
||||
backup.makeFromCurrent()
|
||||
self._enableAutoSave()
|
||||
# We don't return a Backup here because we want plugins only to interact with our API and not full objects.
|
||||
|
|
|
@ -39,7 +39,8 @@ class AuthorizationService:
|
|||
self._server = LocalAuthorizationServer(self._auth_helpers, self._onAuthStateChanged, daemon=True)
|
||||
|
||||
def initialize(self, preferences: Optional["Preferences"] = None) -> None:
|
||||
self._preferences = preferences
|
||||
if preferences is not None:
|
||||
self._preferences = preferences
|
||||
if self._preferences:
|
||||
self._preferences.addPreference(self._settings.AUTH_DATA_PREFERENCE_KEY, "{}")
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue