From 6886abec1a4d2a09737e933eda10b3a04c12bc17 Mon Sep 17 00:00:00 2001 From: user Date: Fri, 7 Mar 2025 12:18:39 +0300 Subject: [PATCH] print search query --- app/client_bot/routers/content.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/client_bot/routers/content.py b/app/client_bot/routers/content.py index 16c5e0b..967cc02 100644 --- a/app/client_bot/routers/content.py +++ b/app/client_bot/routers/content.py @@ -116,7 +116,9 @@ async def t_inline_query_node_content(query: types.InlineQuery, memory=None, use cid = ContentId.deserialize(args) content_list = [] - content = db_session.query(StoredContent).filter_by(hash=cid.content_hash_b58).first() + search_query = {'hash': cid.content_hash_b58} + make_log("InlineSearch", f"Searching with query '{search_query}'.", level='info') + content = db_session.query(StoredContent).filter_by(**search_query).first() content_prod = content.open_content(db_session) # Get both encrypted and decrypted content objects encrypted_content = content_prod['encrypted_content']