Browse Source

Add None-check for download url

CURA-7150
Nino van Hooff 5 years ago
parent
commit
2e7b47f1ea
1 changed files with 4 additions and 1 deletions
  1. 4 1
      plugins/CuraDrive/src/RestoreBackupJob.py

+ 4 - 1
plugins/CuraDrive/src/RestoreBackupJob.py

@@ -36,8 +36,11 @@ class RestoreBackupJob(Job):
 
     def run(self) -> None:
 
+        url = self._backup.get("download_url")
+        assert url is not None
+
         HttpRequestManager.getInstance().get(
-            url = self._backup.get("download_url"),
+            url =url,
             callback = self._onRestoreRequestCompleted,
             error_callback = self._onRestoreRequestCompleted
         )