Raw Arrays
This commit is contained in:
Binary file not shown.
@@ -957,8 +957,10 @@ def process_requests_mapping(output_request, request_data):
|
|||||||
if not found:
|
if not found:
|
||||||
final_value = f"$$$$ Value Error : {final_value}"
|
final_value = f"$$$$ Value Error : {final_value}"
|
||||||
|
|
||||||
# Post-processing: If the value is a list, join it with a pipe
|
field_template = field.get("field_template")
|
||||||
if isinstance(final_value, list):
|
|
||||||
|
# Post-processing: If the value is a list, join it with a pipe (unless raw_array template)
|
||||||
|
if isinstance(final_value, list) and field_template != "raw_array":
|
||||||
final_value = "|".join(map(str, final_value))
|
final_value = "|".join(map(str, final_value))
|
||||||
|
|
||||||
# Post-processing: Format score dictionaries
|
# Post-processing: Format score dictionaries
|
||||||
@@ -966,8 +968,7 @@ def process_requests_mapping(output_request, request_data):
|
|||||||
final_value = f"{final_value['total']}/{final_value['max']}"
|
final_value = f"{final_value['total']}/{final_value['max']}"
|
||||||
|
|
||||||
# Post-processing: Apply field template
|
# Post-processing: Apply field template
|
||||||
field_template = field.get("field_template")
|
if field_template and field_template != "raw_array" and final_value not in ["undefined", "N/A"] and isinstance(final_value, (str, int, float, bool)):
|
||||||
if field_template and final_value not in ["undefined", "N/A"] and isinstance(final_value, (str, int, float, bool)):
|
|
||||||
if "%" in field_template:
|
if "%" in field_template:
|
||||||
formatted = _apply_date_format(field_template, str(final_value))
|
formatted = _apply_date_format(field_template, str(final_value))
|
||||||
final_value = formatted if formatted is not None else f"$$$$ Date Format Error: {final_value}"
|
final_value = formatted if formatted is not None else f"$$$$ Date Format Error: {final_value}"
|
||||||
|
|||||||
Reference in New Issue
Block a user