fix
This commit is contained in:
parent
c9762fd959
commit
d140c120ca
@ -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",
|
||||
|
||||
2
main.py
2
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()}
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user