Skip to content
Snippets Groups Projects
Unverified Commit e45bccfb authored by Maxime FRIESS's avatar Maxime FRIESS :blue_heart:
Browse files

[data]Fixed wrong order for script

parent e4d5d21b
Branches
No related merge requests found
Pipeline #78316 failed with stages
in 25 seconds
......@@ -12,6 +12,14 @@ def load_csv(f):
for line in pyexcel.get_array(file_name=f, start_row=2):
section_id, section_name, section_color, question_id, question_text, value_name, value_next_section, value_next_question, environment_impact, economical_impact, social_impact, end_type, end_message = line
if question_id != '':
if question != None:
section["questions"].append(question)
question = {
"id": int(question_id),
"text": str(question_text),
"values": []
}
if section_id != '':
if section != None:
data.append(section)
......@@ -21,14 +29,6 @@ def load_csv(f):
"color": str(section_color),
"questions": []
}
if question_id != '':
if question != None:
section["questions"].append(question)
question = {
"id": int(question_id),
"text": str(question_text),
"values": []
}
if value_name != '':
value = {
"name": str(value_name),
......
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