Fix machine duplication when switching configuration

This commit is contained in:
Jaime van Kessel 2019-12-02 13:59:50 +01:00
parent df1e0abd93
commit 95cffb6710
No known key found for this signature in database
GPG key ID: 3710727397403C91

View file

@ -1247,6 +1247,8 @@ class MachineManager(QObject):
if metadata_key in new_machine.getMetaData():
continue # Don't copy the already preset stuff.
new_machine.setMetaDataEntry(metadata_key, self._global_container_stack.getMetaDataEntry(metadata_key))
# Special case, group_id should be overwritten!
new_machine.setMetaDataEntry("group_id", self._global_container_stack.getMetaDataEntry("group_id"))
else:
Logger.log("i", "Found a %s with the key %s. Let's use it!", machine_name, self.activeMachineNetworkKey())