Fix the error about appliance ID not found (#1075)

* Fix the error about appliance ID not found

* Copy appliance data before editing it
This commit is contained in:
Julien Duponchelle authored and GitHub committed 2017-06-19 08:47:50 +02:00
1 parent b9e2b7945a
commit c8c991af78
4 files changed
+50 -30

No files matched your search

+5 -1
View File
@@ -32,9 +32,13 @@ class Appliance:
def __init__(self, appliance_id, data, builtin=False):
if appliance_id is None:
self._id = str(uuid.uuid4())
elif isinstance(appliance_id, uuid.UUID):
self._id = str(appliance_id)
else:
self._id = appliance_id
self._data = data
self._data = data.copy()
if "appliance_id" in self._data:
del self._data["appliance_id"]
# Version of the gui before 2.1 use linked_base
# and the server linked_clone