mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 21:45:59 +08:00
Connecting with a different machine resets the authentication data
This commit is contained in:
parent
ea022204ad
commit
3c2836f3f5
@ -38,8 +38,12 @@ class DiscoverUM3Action(MachineAction):
|
||||
def setKey(self, key):
|
||||
global_container_stack = Application.getInstance().getGlobalContainerStack()
|
||||
if global_container_stack:
|
||||
if "um_network_key" in global_container_stack.getMetaData():
|
||||
meta_data = global_container_stack.getMetaData()
|
||||
if "um_network_key" in meta_data:
|
||||
global_container_stack.setMetaDataEntry("um_network_key", key)
|
||||
# Delete old authentication data.
|
||||
global_container_stack.removeMetaDataEntry("network_authentication_id")
|
||||
global_container_stack.removeMetaDataEntry("network_authentication_key")
|
||||
else:
|
||||
global_container_stack.addMetaDataEntry("um_network_key", key)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user