diff options
Diffstat (limited to 'web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py')
| -rw-r--r-- | web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py b/web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py index ab7b7006..952959ca 100644 --- a/web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py +++ b/web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py @@ -2,7 +2,6 @@ from datetime import datetime from opendc.models.simulation import Simulation from opendc.models.topology import Topology -from opendc.util import exceptions from opendc.util.rest import Response from opendc.util.database import Database @@ -22,7 +21,7 @@ def POST(request): topology.set_property('datetimeLastEdited', Database.datetime_to_string(datetime.now())) topology.insert() - simulation.obj['topologyIds'].append(topology.obj['_id']) + simulation.obj['topologyIds'].append(topology.get_id()) simulation.set_property('datetimeLastEdited', Database.datetime_to_string(datetime.now())) simulation.update() |
