🐛 修复更新 cookies 数据时读取错误的问题

This commit is contained in:
洛水居室 2022-09-09 18:10:55 +08:00
parent b173c3e90d
commit 6fabd248e6
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -36,7 +36,7 @@ class CookiesRepository:
else:
raise RegionNotFoundError(region.name)
results = await session.exec(statement)
db_cookies = results.one()
db_cookies = results.first()
if db_cookies is None:
raise CookiesNotFoundError(user_id)
db_cookies = db_cookies[0]