Fix sign of __contains__

Should've been the other way around!

Contributes to issue CURA-6793.
This commit is contained in:
Ghostkeeper 2019-10-10 16:10:19 +02:00
parent 22d874d932
commit f6d83d7a6b
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -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.
#