Update process_data.py
Browse files- process_data.py +2 -2
process_data.py
CHANGED
|
@@ -451,7 +451,7 @@ def parse_survey_stack_data(data):
|
|
| 451 |
processed_data["stepwise_json_creation"] = data[0]['data']['stepwisejsoncreation']['value']
|
| 452 |
print("STEPWISE?: " + str(processed_data["stepwise_json_creation"]))
|
| 453 |
|
| 454 |
-
if processed_data["stepwise_json_creation"] == "stepwisejsoncreation":
|
| 455 |
print("IN THE STEP")
|
| 456 |
processed_data["input_text_pieces"] = {}
|
| 457 |
processed_data["input_text_pieces"]["field_data_input"] = farm_management_inputs.get('field_data_input', {}).get('value', None)
|
|
@@ -460,7 +460,7 @@ def parse_survey_stack_data(data):
|
|
| 460 |
processed_data["input_text_pieces"]["soil_data_input"] = farm_management_inputs.get('soil_data_input', {}).get('value', None)
|
| 461 |
processed_data["input_text_pieces"]["yield_data_input"] = farm_management_inputs.get('yield_data_input', {}).get('value', None)
|
| 462 |
processed_data["input_text"] = "EMPTY"
|
| 463 |
-
elif processed_data["stepwise_json_creation"] == "singlejsoncreation":
|
| 464 |
print("IN THE SINGLE")
|
| 465 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
| 466 |
processed_data["input_text_pieces"] = {}
|
|
|
|
| 451 |
processed_data["stepwise_json_creation"] = data[0]['data']['stepwisejsoncreation']['value']
|
| 452 |
print("STEPWISE?: " + str(processed_data["stepwise_json_creation"]))
|
| 453 |
|
| 454 |
+
if processed_data["stepwise_json_creation"][0] == "stepwisejsoncreation":
|
| 455 |
print("IN THE STEP")
|
| 456 |
processed_data["input_text_pieces"] = {}
|
| 457 |
processed_data["input_text_pieces"]["field_data_input"] = farm_management_inputs.get('field_data_input', {}).get('value', None)
|
|
|
|
| 460 |
processed_data["input_text_pieces"]["soil_data_input"] = farm_management_inputs.get('soil_data_input', {}).get('value', None)
|
| 461 |
processed_data["input_text_pieces"]["yield_data_input"] = farm_management_inputs.get('yield_data_input', {}).get('value', None)
|
| 462 |
processed_data["input_text"] = "EMPTY"
|
| 463 |
+
elif processed_data["stepwise_json_creation"][0] == "singlejsoncreation":
|
| 464 |
print("IN THE SINGLE")
|
| 465 |
processed_data["input_text"] = data[0]['data']['onelonginputtext']['value']
|
| 466 |
processed_data["input_text_pieces"] = {}
|