Skip to content

Commit

Permalink
remove print clean_kobo
Browse files Browse the repository at this point in the history
  • Loading branch information
jmargutt committed Dec 7, 2023
1 parent 0a12a1a commit 1e0ee0f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,7 @@ def clean_kobo_data(kobo_data):
# remove group names
for key in list(kobo_data_clean.keys()):
new_key = key.split('/')[-1]
# if new_key not in kobo_data_clean.keys():
kobo_data_clean[new_key] = kobo_data_clean.pop(key)
# else:
# new_value = kobo_data_clean.pop(key)
# if kobo_data_clean[new_key] == "" or kobo_data_clean[new_key] is None:
# kobo_data_clean[new_key] = new_value
return kobo_data_clean


Expand All @@ -110,9 +105,7 @@ async def kobo_to_espocrm(request: Request, dependencies=Depends(required_header
client = EspoAPI(request.headers['targeturl'], request.headers['targetkey'])

kobo_data = await request.json()
logging.info(kobo_data)
kobo_data = clean_kobo_data(kobo_data)
logging.info(kobo_data)
attachments = get_attachment_dict(kobo_data)

# check if records need to be updated
Expand Down

0 comments on commit 1e0ee0f

Please sign in to comment.