diff options
| author | Georgios Andreadis <info@gandreadis.com> | 2020-07-07 09:55:10 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2020-08-24 19:47:25 +0200 |
| commit | b4bdf9fde013bb7ff9579693b64ff575f7b00e44 (patch) | |
| tree | 5e05ceba918849391a639bbeeab37d290a86523c /web-server/opendc/api/v2/topologies/topologyId/endpoint.py | |
| parent | 7331e9baf2cfe7bdfb24effcf0a4801da1e7ea4d (diff) | |
Rename simulations to projects and remove experiment view
Diffstat (limited to 'web-server/opendc/api/v2/topologies/topologyId/endpoint.py')
| -rw-r--r-- | web-server/opendc/api/v2/topologies/topologyId/endpoint.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/web-server/opendc/api/v2/topologies/topologyId/endpoint.py b/web-server/opendc/api/v2/topologies/topologyId/endpoint.py index 1dcccb3e..512b050a 100644 --- a/web-server/opendc/api/v2/topologies/topologyId/endpoint.py +++ b/web-server/opendc/api/v2/topologies/topologyId/endpoint.py @@ -1,7 +1,7 @@ from datetime import datetime from opendc.util.database import Database -from opendc.models.simulation import Simulation +from opendc.models.project import Project from opendc.models.topology import Topology from opendc.util.rest import Response @@ -45,11 +45,11 @@ def DELETE(request): topology.check_exists() topology.check_user_access(request.google_id, True) - simulation = Simulation.from_id(topology.obj['simulationId']) - simulation.check_exists() - if request.params_path['topologyId'] in simulation.obj['topologyIds']: - simulation.obj['topologyIds'].remove(request.params_path['topologyId']) - simulation.update() + project = Project.from_id(topology.obj['projectId']) + project.check_exists() + if request.params_path['topologyId'] in project.obj['topologyIds']: + project.obj['topologyIds'].remove(request.params_path['topologyId']) + project.update() old_object = topology.delete() |
