From d1f0681dba1effec54e73928b63af7e83e8f1afc Mon Sep 17 00:00:00 2001 From: Bulat Kurbanov Date: Tue, 18 Mar 2025 19:02:57 +0100 Subject: [PATCH] Fix --- src/modules/stream_notifications/twitch/token_storage.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/modules/stream_notifications/twitch/token_storage.py b/src/modules/stream_notifications/twitch/token_storage.py index 95a2bc6..0227fba 100644 --- a/src/modules/stream_notifications/twitch/token_storage.py +++ b/src/modules/stream_notifications/twitch/token_storage.py @@ -1,5 +1,9 @@ +import logging + from core.mongo import mongo_manager +logger = logging.getLogger(__name__) + class TokenStorage: COLLECTION_NAME = "secrets" @@ -27,4 +31,7 @@ class TokenStorage: data = await collection.find_one({"type": TokenStorage.TYPE, "user": user}) + if data is None: + logging.info(f"Token for user {user} not found") + return data["access_token"], data["refresh_token"]