Fix appliance properties lost when you create two node from template

This commit is contained in:
Julien Duponchelle committed 2017-06-28 09:37:19 +02:00
1 parent 617868402f
commit 0a6dc55645
4 files changed
+22 -5

No files matched your search

+2 -1
View File
@@ -325,11 +325,12 @@ class Project:
Create a node from an appliance
"""
try:
template = copy.copy(self.controller.appliances[appliance_id].data)
template = self.controller.appliances[appliance_id].data
except KeyError:
msg = "Appliance {} doesn't exist".format(appliance_id)
log.error(msg)
raise aiohttp.web.HTTPNotFound(text=msg)
print(template)
template["x"] = x
template["y"] = y
node_type = template.pop("node_type")