From 1127ee0ebcf3219b712b9f6142be2c5abb16ec30 Mon Sep 17 00:00:00 2001 From: tanshu Date: Fri, 18 Dec 2020 14:30:11 +0530 Subject: [PATCH] I think that when logging in with a client which will be deleted in the later command, there was an error --- brewman/brewman/routers/login.py | 1 + 1 file changed, 1 insertion(+) diff --git a/brewman/brewman/routers/login.py b/brewman/brewman/routers/login.py index 75c79a9f..a2803e3a 100644 --- a/brewman/brewman/routers/login.py +++ b/brewman/brewman/routers/login.py @@ -61,6 +61,7 @@ async def login_for_access_token( if allowed: history = LoginHistory(user.id, client.id) db.add(history) + db.flush() db.execute( LoginHistory.__table__.delete( or_(