This commit is contained in:
vladislav 2026-09-14 08:35:13 -04:00
parent c9762fd959
commit d140c120ca
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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()}
)