Commit d633dae7 authored by Ryan Herbert's avatar Ryan Herbert
Browse files

file.py missing set association error

report the error to the user when no sets are selected during upload
parent 07bf5fb9
......@@ -75,10 +75,16 @@ def validate(myfile):
return error
def validate_sets(myfile, errors):
mf = ModelFactory()
helpers = {}
myfile['id_dict'] = {}
myfile['sets'] = []
if len(myfile['set_ids']) == 0:
errors.append("missing set association")
return myfile
mf = ModelFactory()
helpers = {}
set_ids = [x.strip() for x in myfile['set_ids'].split(',')]
for sid in set_ids:
try:
......
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