diff --git a/cura/Settings/CuraContainerRegistry.py b/cura/Settings/CuraContainerRegistry.py index 00a0eedbf0..7e6c3f5d20 100644 --- a/cura/Settings/CuraContainerRegistry.py +++ b/cura/Settings/CuraContainerRegistry.py @@ -1,4 +1,4 @@ -# Copyright (c) 2019 Ultimaker B.V. +# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os @@ -381,9 +381,10 @@ class CuraContainerRegistry(ContainerRegistry): if profile_count > 1: continue # Only one profile found, this should not ever be the case, so that profile needs to be removed! - Logger.log("d", "Found an invalid quality_changes profile with the name %s. Going to remove that now", profile_name) invalid_quality_changes = ContainerRegistry.getInstance().findContainersMetadata(name=profile_name) - self.removeContainer(invalid_quality_changes[0]["id"]) + if invalid_quality_changes: + Logger.log("d", "Found an invalid quality_changes profile with the name %s. Going to remove that now", profile_name) + self.removeContainer(invalid_quality_changes[0]["id"]) @override(ContainerRegistry) def _isMetadataValid(self, metadata: Optional[Dict[str, Any]]) -> bool: