diff --git a/alkatorapi/views.py b/alkatorapi/views.py index da8868f..8fabb1b 100644 --- a/alkatorapi/views.py +++ b/alkatorapi/views.py @@ -229,6 +229,8 @@ def change_racer(request): return HttpResponse('{"success":"Úspěšně uloženo."}', content_type='application/json') except MultiValueDictKeyError: return HttpResponse('{"reason":"Nějaký údaj chybí!"}', status=400, content_type='application/json') + except Racer.DoesNotExist: + return HttpResponse('{"reason":"Upravujete neexistujícího závodníka!"}', status=400, content_type='application/json') @csrf_exempt