Also move _getMachineTypeNameFromId to DiscoveredPrintersModel

As this is only used by that model, there is no point in keeping it in the machine manager
This commit is contained in:
Jaime van Kessel 2019-06-07 15:04:19 +02:00
parent 5eee3fc368
commit a98f88e6a3
2 changed files with 13 additions and 15 deletions

View file

@ -1648,14 +1648,6 @@ class MachineManager(QObject):
return abbr_machine
@pyqtSlot(str, result = str)
def getMachineTypeNameFromId(self, machine_type_id: str) -> str:
machine_type_name = ""
results = self._container_registry.findDefinitionContainersMetadata(id = machine_type_id)
if results:
machine_type_name = results[0]["name"]
return machine_type_name
# Gets all machines that belong to the given group_id.
def getMachinesInGroup(self, group_id: str) -> List["GlobalStack"]:
return self._container_registry.findContainerStacks(type = "machine", group_id = group_id)