fix: xxx is not bound to a Session (#24966)
This commit is contained in:
@@ -145,7 +145,10 @@ class AccountService:
|
||||
if naive_utc_now() - account.last_active_at > timedelta(minutes=10):
|
||||
account.last_active_at = naive_utc_now()
|
||||
db.session.commit()
|
||||
|
||||
# NOTE: make sure account is accessible outside of a db session
|
||||
# This ensures that it will work correctly after upgrading to Flask version 3.1.2
|
||||
db.session.refresh(account)
|
||||
db.session.close()
|
||||
return account
|
||||
|
||||
@staticmethod
|
||||
|
Reference in New Issue
Block a user