postquery-topics-authors2
This commit is contained in:
@@ -83,7 +83,7 @@ def get_shouts_with_stats(q, limit, offset=0, author_id=None):
|
||||
|
||||
# Выполнение запроса и обработка результатов
|
||||
with local_session() as session:
|
||||
results = session.execute(q, {"author_id": author_id}).all()
|
||||
results = session.execute(q, {"author_id": author_id}).all() if author_id else session.execute(q).all()
|
||||
|
||||
# Получаем все ID публикаций
|
||||
shout_ids = [row.Shout.id for row in results]
|
||||
|
Reference in New Issue
Block a user