summaryrefslogtreecommitdiff
path: root/opendc/api/v2/simulations/endpoint.py
diff options
context:
space:
mode:
authorjc0b <j@jc0b.computer>2020-06-26 12:30:16 +0200
committerjc0b <j@jc0b.computer>2020-06-26 12:30:16 +0200
commitf1017676a150de60b13ff2b33ca83079d87aebfc (patch)
tree15c84fd426f65d54c70d405b9a2fc82b579c2812 /opendc/api/v2/simulations/endpoint.py
parent6f51282cd7c3945ddd0fac68407a7a7be57aa2ba (diff)
parent19bede4fc7f7320bb4eb16c3fe1a211b19ab4714 (diff)
Merged refactoring changes with upstream
Diffstat (limited to 'opendc/api/v2/simulations/endpoint.py')
-rw-r--r--opendc/api/v2/simulations/endpoint.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/opendc/api/v2/simulations/endpoint.py b/opendc/api/v2/simulations/endpoint.py
index dfeb8d5e..62257d40 100644
--- a/opendc/api/v2/simulations/endpoint.py
+++ b/opendc/api/v2/simulations/endpoint.py
@@ -11,10 +11,7 @@ from opendc.util.rest import Response
def POST(request):
"""Create a new simulation, and return that new simulation."""
- try:
- request.check_required_parameters(body={'simulation': {'name': 'string'}})
- except exceptions.ParameterError as e:
- return Response(400, str(e))
+ request.check_required_parameters(body={'simulation': {'name': 'string'}})
topology = Topology({'name': 'Default topology'})
topology.insert()