From b4bdf9fde013bb7ff9579693b64ff575f7b00e44 Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Tue, 7 Jul 2020 09:55:10 +0200 Subject: Rename simulations to projects and remove experiment view --- web-server/opendc/api/v2/topologies/topologyId/endpoint.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'web-server/opendc/api/v2/topologies/topologyId/endpoint.py') 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() -- cgit v1.2.3