fixed code implicit special and ran black for CI

This commit is contained in:
ppanchigar
2026-02-04 10:57:40 -06:00
parent 6751a5ab7a
commit 5b619b2f5f
12 changed files with 81 additions and 49 deletions
@@ -232,13 +232,16 @@ def get_crosswalk_fields(answer_dicts: list, constants: Constants):
to_field_answer_list.append(
individual_from_field_value
)
# Assign the result: convert to string if it's a single-value field with one element
if to_field_name in SINGLE_VALUE_FIELDS and len(to_field_answer_list) == 1:
if (
to_field_name in SINGLE_VALUE_FIELDS
and len(to_field_answer_list) == 1
):
answer_dict[to_field_name] = to_field_answer_list[0]
else:
answer_dict[to_field_name] = to_field_answer_list
# DO NOT update from_field_name - preserve its original format
# The crosswalk should only create/update the target field (to_field_name),
# not modify the source field (from_field_name)