Skip to content

Commit

Permalink
fix dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jmargutt committed Mar 15, 2024
1 parent 55467b2 commit 94bb0f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']}"
Expand Down Expand Up @@ -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):
Expand All @@ -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 = {
Expand Down

0 comments on commit 94bb0f2

Please sign in to comment.