From a319da872c49a53324217c4a76708e833b62a0ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sat, 28 Dec 2019 20:02:55 +0100 Subject: [PATCH] invalid data? we'll tell you off! --- src/c3nav/routing/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/c3nav/routing/api.py b/src/c3nav/routing/api.py index 2cc11f6c..7d791b1c 100644 --- a/src/c3nav/routing/api.py +++ b/src/c3nav/routing/api.py @@ -124,6 +124,10 @@ class RoutingViewSet(ViewSet): data = {} else: data = request.data + if 'stations' not in data: + return Response({ + 'errors': (_('stations is missing.'),), + }, status=400) stations_data = data['stations'] try: