From f24a4faf08994993e4d8a4eebf9015c039123cec Mon Sep 17 00:00:00 2001 From: user Date: Fri, 5 Apr 2024 13:42:38 +0300 Subject: [PATCH] fix --- app/bot/routers/content.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/bot/routers/content.py b/app/bot/routers/content.py index 5d0ca80..aa13aca 100644 --- a/app/bot/routers/content.py +++ b/app/bot/routers/content.py @@ -4,6 +4,7 @@ from aiogram import types, Router, F from app.core._config import WEB_APP_URLS from app.core._keyboards import get_inline_keyboard from app.core._utils.tg_process_template import tg_process_template +from app.core.logger import make_log from app.core.models.node_storage import StoredContent import json @@ -24,9 +25,11 @@ async def t_callback_owned_content(query: types.CallbackQuery, memory=None, user ).all(): try: metadata_content = StoredContent.from_cid(db_session, content.json_format()['metadata_cid']) + make_log("OwnedContent", f"Metadata content: {metadata_content.file_path}") with open(metadata_content.file_path, 'r') as f: metadata_content_json = json.loads(f.read()) - except: + except BaseException as e: + make_log("OwnedContent", f"Can't get metadata content: {e}", level='warning') continue content_list.append([