Update process_data.py
Browse files- process_data.py +5 -3
process_data.py
CHANGED
|
@@ -526,15 +526,15 @@ def parse_survey_stack_data(data):
|
|
| 526 |
print("PROCESSING SURVEY STACK DATA")
|
| 527 |
processed_data = {}
|
| 528 |
|
| 529 |
-
farm_management_inputs = data[0]['data']['group_4']
|
| 530 |
-
|
| 531 |
-
print("FARM MANAGEMENT INPUTS" + str(farm_management_inputs))
|
| 532 |
|
| 533 |
processed_data["stepwise_json_creation"] = data[0]['data']['stepwisejsoncreation']['value']
|
| 534 |
print("STEPWISE?: " + str(processed_data["stepwise_json_creation"]))
|
| 535 |
|
| 536 |
if processed_data["stepwise_json_creation"][0] == "stepwisejsoncreation":
|
| 537 |
print("IN THE STEP")
|
|
|
|
|
|
|
|
|
|
| 538 |
processed_data["input_text_pieces"] = {}
|
| 539 |
processed_data["input_text_pieces"]["field_data_input"] = farm_management_inputs.get('field_data_input', {}).get('value', None)
|
| 540 |
processed_data["input_text_pieces"]["planting_data_input"] = farm_management_inputs.get('planting_data_input', {}).get('value', None)
|
|
@@ -545,6 +545,8 @@ def parse_survey_stack_data(data):
|
|
| 545 |
elif processed_data["stepwise_json_creation"][0] == "singlejsoncreation":
|
| 546 |
print("IN THE SINGLE")
|
| 547 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
|
|
|
|
|
|
| 548 |
processed_data["input_text_pieces"] = {}
|
| 549 |
processed_data["input_text_pieces"]["field_data_input"] = "EMPTY"
|
| 550 |
processed_data["input_text_pieces"]["planting_data_input"] = "EMPTY"
|
|
|
|
| 526 |
print("PROCESSING SURVEY STACK DATA")
|
| 527 |
processed_data = {}
|
| 528 |
|
|
|
|
|
|
|
|
|
|
| 529 |
|
| 530 |
processed_data["stepwise_json_creation"] = data[0]['data']['stepwisejsoncreation']['value']
|
| 531 |
print("STEPWISE?: " + str(processed_data["stepwise_json_creation"]))
|
| 532 |
|
| 533 |
if processed_data["stepwise_json_creation"][0] == "stepwisejsoncreation":
|
| 534 |
print("IN THE STEP")
|
| 535 |
+
farm_management_inputs = data[0]['data']['group_4']
|
| 536 |
+
print("FARM MANAGEMENT INPUTS" + str(farm_management_inputs))
|
| 537 |
+
|
| 538 |
processed_data["input_text_pieces"] = {}
|
| 539 |
processed_data["input_text_pieces"]["field_data_input"] = farm_management_inputs.get('field_data_input', {}).get('value', None)
|
| 540 |
processed_data["input_text_pieces"]["planting_data_input"] = farm_management_inputs.get('planting_data_input', {}).get('value', None)
|
|
|
|
| 545 |
elif processed_data["stepwise_json_creation"][0] == "singlejsoncreation":
|
| 546 |
print("IN THE SINGLE")
|
| 547 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
| 548 |
+
print(processed_data["input_text"])
|
| 549 |
+
|
| 550 |
processed_data["input_text_pieces"] = {}
|
| 551 |
processed_data["input_text_pieces"]["field_data_input"] = "EMPTY"
|
| 552 |
processed_data["input_text_pieces"]["planting_data_input"] = "EMPTY"
|