From d140c120ca835bf7d76b4b50abc679d5831f161d2d9de839061310c03fd44673 Mon Sep 17 00:00:00 2001 From: vladislav Date: Mon, 14 Sep 2026 08:35:13 -0400 Subject: [PATCH] fix --- main.ipynb | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/main.ipynb b/main.ipynb index 046a0b3..9b43bd2 100644 --- a/main.ipynb +++ b/main.ipynb @@ -1711,7 +1711,7 @@ " posts = [doc async for doc in get_delivery_aggregate({\"exhibition_id\": exhibition_id}, ['Получено', 'Получено галерей', 'Продано', 'На выставке'])]\n", " for i in posts:\n", " if (post_id:=i.get('post_id')) and 'post' not in i:\n", - " i['post'] = posts_collection.find_one({'_id': ObjectId(post_id)})\n", + " i['post'] = await posts_collection.find_one({'_id': ObjectId(post_id)})\n", " return templates.TemplateResponse(\n", " request=request, name=\"exhibition/index.html\", context={\"id\": 1, \"user\": user, \"exhibition\": exhibition, \"posts\": posts, 'now': datetime.now()}\n", " )\n", diff --git a/main.py b/main.py index 65e2d00..f8cbf48 100644 --- a/main.py +++ b/main.py @@ -1282,7 +1282,7 @@ async def exhibition_members( posts = [doc async for doc in get_delivery_aggregate({"exhibition_id": exhibition_id}, ['Получено', 'Получено галерей', 'Продано', 'На выставке'])] for i in posts: if (post_id:=i.get('post_id')) and 'post' not in i: - i['post'] = posts_collection.find_one({'_id': ObjectId(post_id)}) + i['post'] = await posts_collection.find_one({'_id': ObjectId(post_id)}) return templates.TemplateResponse( request=request, name="exhibition/index.html", context={"id": 1, "user": user, "exhibition": exhibition, "posts": posts, 'now': datetime.now()} )