mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Disambiguate between list of metadatas and metadata
Because MyPy doesn't allow a variable to change its type later. Contributes to issue CURA-5330.
This commit is contained in:
parent
79c6b2dad8
commit
a401c1d64f
1 changed files with 3 additions and 3 deletions
|
@ -870,11 +870,11 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
machine_id_list = cls.getPossibleDefinitionIDsFromName(identifier.get("product"))
|
||||
|
||||
for machine_id in machine_id_list:
|
||||
definition_metadata = ContainerRegistry.getInstance().findDefinitionContainersMetadata(id = machine_id)
|
||||
if not definition_metadata:
|
||||
definition_metadatas = ContainerRegistry.getInstance().findDefinitionContainersMetadata(id = machine_id)
|
||||
if not definition_metadatas:
|
||||
continue
|
||||
|
||||
definition_metadata = definition_metadata[0]
|
||||
definition_metadata = definition_metadatas[0]
|
||||
|
||||
machine_manufacturer = identifier.get("manufacturer", definition_metadata.get("manufacturer", "Unknown")) #If the XML material doesn't specify a manufacturer, use the one in the actual printer definition.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue