Fix KeyError in WorkspaceDialog

CURA-4404
This commit is contained in:
Lipu Fei 2017-10-05 13:13:00 +02:00
parent f2ecf41ab1
commit 0eeded7930

View file

@ -239,7 +239,8 @@ class WorkspaceDialog(QObject):
# If the machine needs to be re-created, the definition_changes should also be re-created. # If the machine needs to be re-created, the definition_changes should also be re-created.
# If the machine strategy is None, it means that there is no name conflict with existing ones. In this case # If the machine strategy is None, it means that there is no name conflict with existing ones. In this case
# new definitions changes are created # new definitions changes are created
if "machine" in self._result and self._result["machine"] == "new" or self._result["machine"] is None and self._result["definition_changes"] is None: if "machine" in self._result:
if self._result["machine"] == "new" or self._result["machine"] is None and self._result["definition_changes"] is None:
self._result["definition_changes"] = "new" self._result["definition_changes"] = "new"
return self._result return self._result