This commit is contained in:
vladislav 2026-09-01 23:23:50 -04:00
parent e3a74103db
commit cacaf9fb64
Signed by: Vladislav
GPG Key ID: D97C9E5E4860EE45
2 changed files with 2 additions and 2 deletions

View File

@ -700,7 +700,7 @@
" exhibition = await exhibition_collection.find_one({'_id': ObjectId(exhibition_id)})\n",
" exhibition_owner = exhibition.get('user')\n",
" obj_ids = [ObjectId(x) for x in exhibition.get('posts', [])]\n",
" posts = await posts_collection.find({\"_id\": {\"$in\": obj_ids}}).to_list() if obj_ids else []\n",
" posts = await posts_collection.find({\"_id\": {\"$in\": obj_ids}, 'status': 'В каталоге'}).to_list() if obj_ids else []\n",
" new_posts = {}\n",
" all_posts = {}\n",
" for post in posts:\n",

View File

@ -529,7 +529,7 @@ async def exhibition_send_invitations(exhibition_id):
exhibition = await exhibition_collection.find_one({'_id': ObjectId(exhibition_id)})
exhibition_owner = exhibition.get('user')
obj_ids = [ObjectId(x) for x in exhibition.get('posts', [])]
posts = await posts_collection.find({"_id": {"$in": obj_ids}}).to_list() if obj_ids else []
posts = await posts_collection.find({"_id": {"$in": obj_ids}, 'status': 'В каталоге'}).to_list() if obj_ids else []
new_posts = {}
all_posts = {}
for post in posts: