mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 08:09:00 +08:00
Added error state for container state if serialization data is none
CURA-2359
This commit is contained in:
parent
db512d3b05
commit
d6e95d2734
@ -349,6 +349,9 @@ class ContainerManager(QObject):
|
|||||||
except NotImplementedError:
|
except NotImplementedError:
|
||||||
return { "status": "error", "message": "Unable to serialize container"}
|
return { "status": "error", "message": "Unable to serialize container"}
|
||||||
|
|
||||||
|
if contents is None:
|
||||||
|
return {"status": "error", "message": "Serialization returned None. Unable to write to file"}
|
||||||
|
|
||||||
with UM.SaveFile(file_url, "w") as f:
|
with UM.SaveFile(file_url, "w") as f:
|
||||||
f.write(contents)
|
f.write(contents)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user