From 7ed54c18d705637a4e47709205fb24298a79a426 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Wed, 25 Oct 2023 14:51:41 +0100 Subject: [PATCH] fixing sql non-null constaint --- src/main.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.py b/src/main.py index ab8aeab..405e328 100644 --- a/src/main.py +++ b/src/main.py @@ -152,6 +152,7 @@ def archive_sheet(sheet:schemas.SubmitSheet, email = Depends(get_bearer_auth)): @app.post("/sheet_service", status_code=201) def archive_sheet_service(sheet:schemas.SubmitSheet, basic_auth = Depends(get_server_auth)): logger.info(f"SHEET TASK for {sheet=}") + sheet.author_id = "api-endpoint" if not sheet.sheet_name and not sheet.sheet_id: raise HTTPException(status_code=422, detail=f"sheet name or id is required") task = create_sheet_task.delay(sheet.json())