shouts-admin-fix2
All checks were successful
Deploy on push / deploy (push) Successful in 6s

This commit is contained in:
Untone 2025-06-28 14:35:22 +03:00
parent c68e964bf5
commit 4bafadde45

View File

@ -402,10 +402,11 @@ async def admin_get_shouts(
shouts_data = [] shouts_data = []
for row in shouts_result: for row in shouts_result:
# Get the Shout object from the row
shout = row[0] if isinstance(row, tuple) else row shout = row[0] if isinstance(row, tuple) else row
# Обрабатываем поле media # Обрабатываем поле media
media_data = [] media_data = []
if shout.media: if hasattr(shout, "media") and shout.media:
if isinstance(shout.media, str): if isinstance(shout.media, str):
try: try:
import orjson import orjson