fixed full deals
This commit is contained in:
44
app/mongo.py
44
app/mongo.py
@ -334,20 +334,32 @@ async def additional_deals_data(*deals: dict, full: bool):
|
|||||||
|
|
||||||
|
|
||||||
async def get_all_summaries(full: bool):
|
async def get_all_summaries(full: bool):
|
||||||
deals = await deals_collection.find({
|
if not full:
|
||||||
"$and": [
|
deals = await deals_collection.find({
|
||||||
{
|
"$and": [
|
||||||
"$or": [
|
{
|
||||||
{"isDeleted": False},
|
"$or": [
|
||||||
{"isDeleted": {"$exists": False}}
|
{"isDeleted": False},
|
||||||
]
|
{"isDeleted": {"$exists": False}}
|
||||||
},
|
]
|
||||||
{
|
},
|
||||||
"$or": [
|
{
|
||||||
{"isCompleted": False},
|
"$or": [
|
||||||
{"isCompleted": {"$exists": False}}
|
{"isCompleted": False},
|
||||||
]
|
{"isCompleted": {"$exists": False}}
|
||||||
}
|
]
|
||||||
]
|
}
|
||||||
}, {"_id": False}).sort("id", asc).to_list()
|
]
|
||||||
|
}, {"_id": False}).sort("id", asc).to_list()
|
||||||
|
else:
|
||||||
|
deals = await deals_collection.find({
|
||||||
|
"$and": [
|
||||||
|
{
|
||||||
|
"$or": [
|
||||||
|
{"isDeleted": False},
|
||||||
|
{"isDeleted": {"$exists": False}}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}, {"_id": False}).sort("id", asc).to_list()
|
||||||
return await additional_deals_data(*deals, full=full)
|
return await additional_deals_data(*deals, full=full)
|
||||||
|
|||||||
Reference in New Issue
Block a user