fix
This commit is contained in:
parent
25cc63fe08
commit
5f6540815f
11
main.ipynb
11
main.ipynb
@ -1615,17 +1615,10 @@
|
||||
" exhibition = await exhibition_collection.find_one({'_id': ObjectId(exhibition_id)})\n",
|
||||
" if exhibition:\n",
|
||||
" match_ = {\n",
|
||||
" \"$or\": [\n",
|
||||
" {\"sender._id\": user.get('_id')},\n",
|
||||
" {\"user._id\": user.get('_id')},\n",
|
||||
" {\"receiver._id\": user.get('_id')}\n",
|
||||
" ],\n",
|
||||
" \"exhibition_id\": exhibition_id,\n",
|
||||
" 'prod': PROD,\n",
|
||||
" }\n",
|
||||
" if data.get('competition'):\n",
|
||||
" match_.update({'competition_id': data.get('competition').get('_id')})\n",
|
||||
" if data.get('exhibition_id'):\n",
|
||||
" match_.update({'exhibition_id': data.get('exhibition_id')})\n",
|
||||
"\n",
|
||||
" cursor = delivery_collection.aggregate([\n",
|
||||
" {\"$match\": match_},\n",
|
||||
" {\"$sort\": {\"_id\": -1}},\n",
|
||||
|
||||
11
main.py
11
main.py
@ -1202,17 +1202,10 @@ async def exhibition_members(
|
||||
exhibition = await exhibition_collection.find_one({'_id': ObjectId(exhibition_id)})
|
||||
if exhibition:
|
||||
match_ = {
|
||||
"$or": [
|
||||
{"sender._id": user.get('_id')},
|
||||
{"user._id": user.get('_id')},
|
||||
{"receiver._id": user.get('_id')}
|
||||
],
|
||||
"exhibition_id": exhibition_id,
|
||||
'prod': PROD,
|
||||
}
|
||||
if data.get('competition'):
|
||||
match_.update({'competition_id': data.get('competition').get('_id')})
|
||||
if data.get('exhibition_id'):
|
||||
match_.update({'exhibition_id': data.get('exhibition_id')})
|
||||
|
||||
cursor = delivery_collection.aggregate([
|
||||
{"$match": match_},
|
||||
{"$sort": {"_id": -1}},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user