fixed full deals

This commit is contained in:
2025-07-26 17:20:34 +03:00
parent 94b7585f8b
commit d25280f368

View File

@ -334,6 +334,7 @@ async def additional_deals_data(*deals: dict, full: bool):
async def get_all_summaries(full: bool): async def get_all_summaries(full: bool):
if not full:
deals = await deals_collection.find({ deals = await deals_collection.find({
"$and": [ "$and": [
{ {
@ -350,4 +351,15 @@ async def get_all_summaries(full: bool):
} }
] ]
}, {"_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)