mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Don't remove machines that don't exist
Fixes Sentry issue CURA-EM.
This commit is contained in:
parent
f34edd6bec
commit
2ee3e5b386
1 changed files with 4 additions and 1 deletions
|
@ -684,7 +684,10 @@ class MachineManager(QObject):
|
|||
if other_machine_stacks:
|
||||
self.setActiveMachine(other_machine_stacks[0]["id"])
|
||||
|
||||
metadata = CuraContainerRegistry.getInstance().findContainerStacksMetadata(id = machine_id)[0]
|
||||
metadatas = CuraContainerRegistry.getInstance().findContainerStacksMetadata(id = machine_id)
|
||||
if not metadatas:
|
||||
return # machine_id doesn't exist. Nothing to remove.
|
||||
metadata = metadatas[0]
|
||||
ExtruderManager.getInstance().removeMachineExtruders(machine_id)
|
||||
containers = CuraContainerRegistry.getInstance().findInstanceContainersMetadata(type = "user", machine = machine_id)
|
||||
for container in containers:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue