From 6d1ab686cf57c2c1add8d473531519b1bc2ed990 Mon Sep 17 00:00:00 2001 From: tijsziere <39266480+tijsziere@users.noreply.github.com> Date: Wed, 22 Jan 2025 17:46:50 +0100 Subject: [PATCH] Push Dev to Prod (#70) * merge main into dev (#58) * merge dev into main - fix empty label in create 121 program (#53) * fix empty label bug * Add support for barcode question type (#54) * fix empty label bug * improve clarity * fix error * add support for kobo barcode questiontype --------- Co-authored-by: Jacopo Margutti * exception: map fspName to programFinancialServiceProviderConfigurationName * exception for nlrc * Update test_koboto121.py Change fspName to programFinancialServiceProviderConfigurationName in test * Changed endpoint url path post registrations Signed-off-by: Ruben * Update README.md * remove nlrc exceptions * Included not in payment export (#66) * Merge into prod (#65) * merge main into dev (#58) * merge dev into main - fix empty label in create 121 program (#53) * fix empty label bug * Add support for barcode question type (#54) * fix empty label bug * improve clarity * fix error * add support for kobo barcode questiontype --------- Co-authored-by: Jacopo Margutti * exception: map fspName to programFinancialServiceProviderConfigurationName * exception for nlrc * Update test_koboto121.py Change fspName to programFinancialServiceProviderConfigurationName in test * Changed endpoint url path post registrations Signed-off-by: Ruben * Update README.md * remove nlrc exceptions --------- Signed-off-by: Ruben Co-authored-by: Jacopo Margutti Co-authored-by: Sanne Berendschot Co-authored-by: Ruben Co-authored-by: RubenGeo <34537157+RubenGeo@users.noreply.github.com> Co-authored-by: Daan Gorsse <110089322+DGorsseRedCross@users.noreply.github.com> * Removed included from export * change test accordingly * also remove phoneNumber from payment export, fix tests * remove print --------- Signed-off-by: Ruben Co-authored-by: tijsziere <39266480+tijsziere@users.noreply.github.com> Co-authored-by: Jacopo Margutti Co-authored-by: Sanne Berendschot Co-authored-by: Ruben Co-authored-by: RubenGeo <34537157+RubenGeo@users.noreply.github.com> Co-authored-by: Daan Gorsse <110089322+DGorsseRedCross@users.noreply.github.com> * better error handling * improve error handling, remove unnecessary checkfields * catch date errors * change to programRegistrationAttributes * update programQuestions to programRegistrationAttribute * update 121 route * re-add fspName * update test * update * remove required field mitigation measure (not needed in 121 anymore) --------- Signed-off-by: Ruben Co-authored-by: Jacopo Margutti Co-authored-by: Sanne Berendschot Co-authored-by: Ruben Co-authored-by: RubenGeo <34537157+RubenGeo@users.noreply.github.com> Co-authored-by: Daan Gorsse <110089322+DGorsseRedCross@users.noreply.github.com> Co-authored-by: Wessel de Jong --- routes/routes121.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/routes/routes121.py b/routes/routes121.py index 815e763..e4a9937 100644 --- a/routes/routes121.py +++ b/routes/routes121.py @@ -74,12 +74,10 @@ async def kobo_to_121(request: Request, dependencies=Depends(required_headers_12 payload[target_field] = clean_text(kobo_data[kobo_field]) elif target_field == "fspName": payload["programFinancialServiceProviderConfigurationName"] = kobo_data[kobo_field] - elif kobo_value_url not in attachments.keys(): + elif kobo_value_url not in attachments.keys() and kobo_data[kobo_field] != "": payload[target_field] = kobo_data[kobo_field] else: payload[target_field] = attachments[kobo_value_url]["url"] - else: - payload[target_field] = "" payload["referenceId"] = referenceId