From f017dbe1f2d9271ea21644cdc669ddfd0f436485 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Wed, 20 Sep 2023 13:52:14 +0100 Subject: [PATCH] quick fix author_id --- src/db/crud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/crud.py b/src/db/crud.py index fd8e12b..f4cac35 100644 --- a/src/db/crud.py +++ b/src/db/crud.py @@ -104,7 +104,7 @@ def get_user_groups(db: Session, email: str): def get_user(db: Session, author_id: str): - author_id = author_id.lower() + if type(author_id)==str: author_id = author_id.lower() db_user = db.query(models.User).filter(models.User.email == author_id).first() if not db_user: db_user = models.User(email=author_id)