From 94bb0f2f23641ab8e6c2b120aa48ae0d8f1b865c Mon Sep 17 00:00:00 2001 From: jmargutti Date: Fri, 15 Mar 2024 16:53:05 +0100 Subject: [PATCH] fix dockerfile --- Dockerfile | 1 + main.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 155b60c..e8851a8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM python:3.9-slim # copy files to the /app folder in the container ADD clients /app/clients +ADD mappings /app/mappings COPY ./main.py /app/main.py COPY ./requirements.txt /app/requirements.txt diff --git a/main.py b/main.py index 6d89a7a..8c3b0df 100644 --- a/main.py +++ b/main.py @@ -450,7 +450,7 @@ def required_headers_121_kobo( @app.post("/create-121-program-from-kobo") async def create_121_program_from_kobo(request: Request, dependencies=Depends(required_headers_121_kobo)): """Utility endpoint to automatically create a 121 Program in 121 from a koboform, including REST Service \n - Does only support the IFRC server kobonew.ifrc.org \n + Does only support the IFRC server kobo.ifrc.org \n ***NB: if you want to duplicate an endpoint, please also use the Hook ID query param***""" koboUrl = f"https://kobo.ifrc.org/api/v2/assets/{request.headers['koboasset']}" @@ -493,7 +493,7 @@ async def create_121_program_from_kobo(request: Request, dependencies=Depends(re lookupdict = dict(zip(survey['name'], survey['default'])) if 'tags'in survey.columns: - dedupedict = dict(zip(survey['name'], survey['tags'])) + dedupedict = dict(zip(survey['name'], survey['tags'])) for key, value in dedupedict.items(): if isinstance(value, list) and any('dedupe' in item for item in value): @@ -502,7 +502,7 @@ async def create_121_program_from_kobo(request: Request, dependencies=Depends(re dedupedict[key] = False else: survey['tags'] = False - dedupedict = dict(zip(survey['name'], survey['tags'])) + dedupedict = dict(zip(survey['name'], survey['tags'])) # Create the JSON structure data = {