Updated form error handling

This commit is contained in:
Vivek Santayana 2022-08-11 16:58:00 +01:00
parent 68314a4ed2
commit 615e59fc6d

View File

@ -57,5 +57,5 @@ def get_dataset_choices():
return dataset_choices return dataset_choices
def send_errors_to_client(form): def send_errors_to_client(form):
errors = [*form.errors] errors = [*form.errors.values()]
return jsonify({ 'error': errors}), 400 return jsonify({ 'error': errors}), 400