🐛 Fix the issue of still getting incorrect cookies when account_id is None

This commit is contained in:
洛水居室 2023-03-15 21:35:46 +08:00
parent 3dbb0e74a0
commit c07e9cf097
No known key found for this signature in database
GPG Key ID: C9DE87DA724B88FC

View File

@ -265,6 +265,8 @@ class GenshinHelper(Plugin):
raise PlayerNotFoundError(user_id)
cookies = None
if need_cookie:
if player.account_id is None:
raise CookiesNotFoundError(user_id)
cookie_model = await self.cookies_service.get(player.user_id, player.account_id, player.region)
if cookie_model is None:
raise CookiesNotFoundError(user_id)