summaryrefslogtreecommitdiff
path: root/web-server/opendc/api/v2/simulations/endpoint.py
diff options
context:
space:
mode:
Diffstat (limited to 'web-server/opendc/api/v2/simulations/endpoint.py')
-rw-r--r--web-server/opendc/api/v2/simulations/endpoint.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/web-server/opendc/api/v2/simulations/endpoint.py b/web-server/opendc/api/v2/simulations/endpoint.py
index bcdea650..993e317a 100644
--- a/web-server/opendc/api/v2/simulations/endpoint.py
+++ b/web-server/opendc/api/v2/simulations/endpoint.py
@@ -22,6 +22,9 @@ def POST(request):
simulation.set_property('experimentIds', [])
simulation.insert()
+ topology.set_property('simulationId', simulation.get_id())
+ topology.update()
+
user = User.from_google_id(request.google_id)
user.obj['authorizations'].append({'simulationId': simulation.get_id(), 'authorizationLevel': 'OWN'})
user.update()