From f6d83d7a6bcb6f76fbc96a687918fa5cf0668f3f Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 10 Oct 2019 16:10:19 +0200 Subject: [PATCH] Fix sign of __contains__ Should've been the other way around! Contributes to issue CURA-6793. --- cura/Machines/ContainerTree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/ContainerTree.py b/cura/Machines/ContainerTree.py index 2901ee29a4..788f30e9e1 100644 --- a/cura/Machines/ContainerTree.py +++ b/cura/Machines/ContainerTree.py @@ -91,7 +91,7 @@ class ContainerTree: # \param definition_id The definition to look for. # \return Whether or not a printer definition exists with that name. def __contains__(self, definition_id: str) -> bool: - return len(ContainerRegistry.getInstance().findContainersMetadata(id = definition_id)) == 0 + return len(ContainerRegistry.getInstance().findContainersMetadata(id = definition_id)) > 0 ## Returns a machine node for the specified definition ID. #