Commit f365d43a authored by Ryan Herbert's avatar Ryan Herbert

file.py refactor error management

error management was incorrect when users entered an incorrect set
identfier string, causing the form the crash.
parent d564563e
......@@ -212,18 +212,15 @@ def submit():
data['errors'] = errors
data['action'] = 'add'
if len(errors) > 0:
return form_response(data)
error = True
for f in data['file']:
errors = validate(f)
f['errors'] = validate(f)
f['sets'], f['id_dict'], err = validate_sets(f['set_ids'])
if len(errors) > 0:
f['error'] = errors
if len(f['errors']) > 0:
error = True
continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment