quick fix author_id

This commit is contained in:
msramalho
2023-09-20 13:52:14 +01:00
parent c6cd027e13
commit f017dbe1f2

View File

@@ -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)