mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-24 07:24:25 +08: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
@ -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…
x
Reference in New Issue
Block a user