From f143888029b1c862656d3c4fa9201ef61eb01217 Mon Sep 17 00:00:00 2001 From: titipata Date: Mon, 4 Oct 2021 20:33:36 +0700 Subject: [PATCH] Fix submission API --- backend/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/api.py b/backend/api.py index 025efee..53a83ac 100644 --- a/backend/api.py +++ b/backend/api.py @@ -641,13 +641,13 @@ async def create_abstract( """ Submit an abstract to Airtable """ + submission = submission.dict() user_info = get_user_info(authorization) user_id = get_user_info(authorization).get("user_id") if user_id is not None: user = get_data(user_id, user_collection) - submission["firstname"] = submission.get("firstname", "") - submission["lastname"] = submission.get("lastname", "") - submission = submission.dict() + submission["firstname"] = user.get("firstname", "") + submission["lastname"] = user.get("lastname", "") # look for base_id for a given "edition" base_id = es_config["editions"][edition].get("airtable_id")