flows: fix wrong exception being caught in flow inspector

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-14 16:06:00 +01:00
parent 05db352a0f
commit d162c79373
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ class FlowInspectorView(APIView):
else: else:
try: try:
current_plan = request.session[SESSION_KEY_HISTORY][-1] current_plan = request.session[SESSION_KEY_HISTORY][-1]
except KeyError: except IndexError:
return Response(status=400) return Response(status=400)
is_completed = True is_completed = True
current_serializer = FlowInspectorPlanSerializer( current_serializer = FlowInspectorPlanSerializer(