From 30d11bd88823703f5dc5478599c889d0d9fa4e52 Mon Sep 17 00:00:00 2001 From: tijsziere <39266480+tijsziere@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:05:49 +0100 Subject: [PATCH] remove nlrc exceptions --- routes/routes121.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/routes/routes121.py b/routes/routes121.py index a7c2f00..c747ec5 100644 --- a/routes/routes121.py +++ b/routes/routes121.py @@ -72,7 +72,7 @@ async def kobo_to_121(request: Request, dependencies=Depends(required_headers_12 payload[target_field] = int(kobo_data[kobo_field]) elif target_field == "scope": payload[target_field] = clean_text(kobo_data[kobo_field]) - elif target_field == "fspName" and "nlrc.121.global" not in request.headers["url121"]: + elif target_field == "fspName": payload["programFinancialServiceProviderConfigurationName"] = kobo_data[kobo_field] elif kobo_value_url not in attachments.keys(): payload[target_field] = kobo_data[kobo_field] @@ -91,10 +91,8 @@ async def kobo_to_121(request: Request, dependencies=Depends(required_headers_12 access_token = login121(request.headers["url121"], request.headers["username121"], request.headers["password121"]) - if 'nlrc.121.global' in request.headers['url121']: - url = f"{request.headers['url121']}/api/programs/{programid}/registrations/import" - else: - url = f"{request.headers['url121']}/api/programs/{programid}/registrations" + url = f"{request.headers['url121']}/api/programs/{programid}/registrations" + # POST to 121 import endpoint import_response = requests.post( url,