mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 22:11:14 +02:00
Don't send variables to computes where are empty, Ref: #1340
This commit is contained in:
1 parent
2e586f56ca
commit
ac73c72727
2 files changed
+21
-8
No files matched your search
@@ -500,18 +500,21 @@ class Project:
|
||||
if compute not in self._project_created_on_compute:
|
||||
# For a local server we send the project path
|
||||
if compute.id == "local":
|
||||
yield from compute.post("/projects", data={
|
||||
data = {
|
||||
"name": self._name,
|
||||
"project_id": self._id,
|
||||
"path": self._path,
|
||||
"variables": self._variables
|
||||
})
|
||||
"path": self._path
|
||||
}
|
||||
else:
|
||||
yield from compute.post("/projects", data={
|
||||
data = {
|
||||
"name": self._name,
|
||||
"project_id": self._id,
|
||||
"variables": self._variables
|
||||
})
|
||||
"project_id": self._id
|
||||
}
|
||||
|
||||
if self._variables:
|
||||
data["variables"] = self._variables
|
||||
|
||||
yield from compute.post("/projects", data=data)
|
||||
|
||||
self._project_created_on_compute.add(compute)
|
||||
yield from node.create()
|
||||
|
||||
Reference in new issue
Block a user