From 4bafadde454df188897c31d69ec4ec0a4450a87d Mon Sep 17 00:00:00 2001 From: Untone Date: Sat, 28 Jun 2025 14:35:22 +0300 Subject: [PATCH] shouts-admin-fix2 --- resolvers/admin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resolvers/admin.py b/resolvers/admin.py index b4331ad7..2fa3e389 100644 --- a/resolvers/admin.py +++ b/resolvers/admin.py @@ -402,10 +402,11 @@ async def admin_get_shouts( shouts_data = [] for row in shouts_result: + # Get the Shout object from the row shout = row[0] if isinstance(row, tuple) else row # Обрабатываем поле media media_data = [] - if shout.media: + if hasattr(shout, "media") and shout.media: if isinstance(shout.media, str): try: import orjson