From 9e3d001d0111c3ac79e2a7eccbad711d84547fba Mon Sep 17 00:00:00 2001 From: Eric Lipe Date: Wed, 4 Dec 2024 13:47:54 -0500 Subject: [PATCH 1/3] - Update validator to allow 3 as a value --- tdrs-backend/tdpservice/parsers/schema_defs/ssp/m2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrs-backend/tdpservice/parsers/schema_defs/ssp/m2.py b/tdrs-backend/tdpservice/parsers/schema_defs/ssp/m2.py index 82d5c2c46..35dfb4354 100644 --- a/tdrs-backend/tdpservice/parsers/schema_defs/ssp/m2.py +++ b/tdrs-backend/tdpservice/parsers/schema_defs/ssp/m2.py @@ -94,7 +94,7 @@ condition_field_name='FAMILY_AFFILIATION', condition_function=category3.isEqual(1), result_field_name='CITIZENSHIP_STATUS', - result_function=category3.isOneOf((1, 2)), + result_function=category3.isOneOf((1, 2, 3)), ), category3.ifThenAlso( condition_field_name='FAMILY_AFFILIATION', From 627345e5c5d99051ae8fb8e04dca6522c1bfd5c0 Mon Sep 17 00:00:00 2001 From: Eric Lipe Date: Fri, 6 Dec 2024 14:10:38 -0500 Subject: [PATCH 2/3] - add value to child schemas --- tdrs-backend/tdpservice/parsers/schema_defs/ssp/m3.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tdrs-backend/tdpservice/parsers/schema_defs/ssp/m3.py b/tdrs-backend/tdpservice/parsers/schema_defs/ssp/m3.py index 6f44c551e..64285ba6e 100644 --- a/tdrs-backend/tdpservice/parsers/schema_defs/ssp/m3.py +++ b/tdrs-backend/tdpservice/parsers/schema_defs/ssp/m3.py @@ -92,7 +92,7 @@ condition_field_name='FAMILY_AFFILIATION', condition_function=category3.isEqual(1), result_field_name='CITIZENSHIP_STATUS', - result_function=category3.isOneOf((1, 2)), + result_function=category3.isOneOf((1, 2, 3)), ), category3.ifThenAlso( condition_field_name='FAMILY_AFFILIATION', @@ -409,7 +409,7 @@ condition_field_name='FAMILY_AFFILIATION', condition_function=category3.isEqual(1), result_field_name='CITIZENSHIP_STATUS', - result_function=category3.isOneOf((1, 2)), + result_function=category3.isOneOf((1, 2, 3)), ), category3.ifThenAlso( condition_field_name='FAMILY_AFFILIATION', From 88c00acb233b7fe6da5445dbd120a0adfee9baef Mon Sep 17 00:00:00 2001 From: Eric Lipe Date: Fri, 6 Dec 2024 14:21:48 -0500 Subject: [PATCH 3/3] - updated count --- tdrs-backend/tdpservice/parsers/test/test_parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdrs-backend/tdpservice/parsers/test/test_parse.py b/tdrs-backend/tdpservice/parsers/test/test_parse.py index d01a44030..1e9cd3840 100644 --- a/tdrs-backend/tdpservice/parsers/test/test_parse.py +++ b/tdrs-backend/tdpservice/parsers/test/test_parse.py @@ -498,7 +498,7 @@ def test_parse_ssp_section1_datafile(ssp_section1_datafile, dfs): assert cat4_errors[1].error_message == "Duplicate record detected with record type M3 at line 3273. " + \ "Record is a duplicate of the record at line number 3272." - assert parser_errors.count() == 32488 + assert parser_errors.count() == 32455 assert SSP_M1.objects.count() == expected_m1_record_count assert SSP_M2.objects.count() == expected_m2_record_count