mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Allow "none" for compute_id in templates.
This commit is contained in:
1 parent
dac2cf4089
commit
55a9abfcea
9 files changed
+53
-14
No files matched your search
@@ -503,7 +503,11 @@ class Project:
|
||||
template["x"] = x
|
||||
template["y"] = y
|
||||
node_type = template.pop("template_type")
|
||||
compute = self.controller.get_compute(template.pop("compute_id", compute_id))
|
||||
if template["builtin"] is True:
|
||||
# compute_id is selected by clients for builtin templates
|
||||
compute = self.controller.get_compute(compute_id)
|
||||
else:
|
||||
compute = self.controller.get_compute(template.pop("compute_id", compute_id))
|
||||
name = template.pop("name")
|
||||
default_name_format = template.pop("default_name_format", "{name}-{0}")
|
||||
name = default_name_format.replace("{name}", name)
|
||||
|
||||
Reference in new issue
Block a user