Commit 90a37cb2 authored by Vilem Ded's avatar Vilem Ded
Browse files

adding strip() to email and study name

parent 3ab1ee8b
......@@ -67,7 +67,7 @@ class DishXlsExporter:
logging.info('Processing sheet ----> {}'.format(book.sheet_names()[idx]))
if is_study(sheet):
cohort_dict = {'name': sheet[1, 1],
cohort_dict = {'name': sheet[1, 1].strip(),
'description' : sheet[2, 1] + ' ' + sheet[6, 1],
'has_ethics_approval' : process_yes_no_answer(sheet[4, 1]),
"ethics_approval_notes": sheet[5, 1],
......@@ -263,31 +263,31 @@ class DishXlsExporter:
dataset_dict["data_declarations"].append(datadec_dict)
elif is_submission(sheet):
dataset_dict["name"] = sheet[2, 1]
dataset_dict["project"] = sheet[5, 1]
dataset_dict["name"] = sheet[2, 1].strip()
dataset_dict["project"] = sheet[5, 1].strip()
dataset_dict["contacts"].extend([{"first_name": get_names_from_string(sheet[9, 1])[0],
"last_name":get_names_from_string(sheet[9, 1])[1],
"role": sheet[11,1],
"email":sheet[10,1],
"email":sheet[10,1].strip(),
"affiliations": [self.process_institution(sheet[7,1])]
},
{"first_name": get_names_from_string(sheet[12, 1])[0],
"last_name":get_names_from_string(sheet[12, 1])[1],
"role": "Legal_Representative",
"email":sheet[10,1],
"email":sheet[10,1].strip(),
"affiliations": [self.process_institution(sheet[7,1])]
},
{"first_name": get_names_from_string(sheet[14, 1])[0],
"last_name":get_names_from_string(sheet[14, 1])[1],
"role": "Data_Protection_Officer",
"email":sheet[10,1],
"email":sheet[10,1].strip(),
"affiliations": [self.process_institution(sheet[7,1])]
}])
if sheet[16, 1] and sheet[18, 1]:
dataset_dict["contacts"].append({"first_name": get_names_from_string(sheet[14, 1])[0],
"last_name": get_names_from_string(sheet[14, 1])[1],
"role": sheet[18,1],
"email": sheet[10,1],
"email": sheet[10,1].strip(),
"affiliations": [self.process_institution(sheet[7,1])]
})
......
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