🐛 Fix AttributeError in CookiesService

This commit is contained in:
洛水居室 2023-10-20 12:40:23 +08:00
parent b705147e69
commit 0576145e6b
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -34,7 +34,7 @@ class RefreshCookiesJob(Plugin):
async def daily_refresh_cookies(self, _: "ContextTypes.DEFAULT_TYPE"): async def daily_refresh_cookies(self, _: "ContextTypes.DEFAULT_TYPE"):
logger.info("正在执行每日刷新 Cookies 任务") logger.info("正在执行每日刷新 Cookies 任务")
for database_region, client_region in REGION.items(): for database_region, client_region in REGION.items():
for cookie_model in await self.cookies.get_all_by_region(database_region): for cookie_model in await self.cookies.get_all(region=database_region):
cookies = cookie_model.data cookies = cookie_model.data
if cookies.get("stoken") is not None and cookie_model.status != CookiesStatusEnum.INVALID_COOKIES: if cookies.get("stoken") is not None and cookie_model.status != CookiesStatusEnum.INVALID_COOKIES:
try: try: