invalid data? we'll tell you off!

This commit is contained in:
Laura Klünder 2019-12-28 20:02:55 +01:00
parent 321c5a34a0
commit a319da872c

View file

@ -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: