small fix

This commit is contained in:
Martin Quarda 2024-10-15 15:00:56 +02:00
parent ef01a43142
commit 47f04c3fe5

View File

@ -229,6 +229,8 @@ def change_racer(request):
return HttpResponse('{"success":"Úspěšně uloženo."}', content_type='application/json') return HttpResponse('{"success":"Úspěšně uloženo."}', content_type='application/json')
except MultiValueDictKeyError: except MultiValueDictKeyError:
return HttpResponse('{"reason":"Nějaký údaj chybí!"}', status=400, content_type='application/json') 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 @csrf_exempt