This commit is contained in:
vladislav 2026-09-14 06:59:06 -04:00
parent 1d2ee61f5f
commit f776d6ce25
2 changed files with 4 additions and 4 deletions

View File

@ -4998,8 +4998,8 @@
" \n", " \n",
" data = [doc async for doc in get_delivery_aggregate(_match)]\n", " data = [doc async for doc in get_delivery_aggregate(_match)]\n",
"\n", "\n",
" exhibitions = await exhibition_collection.find({'_id': {'$in': [ObjectId(i.get('exhibition_id')) for i in data if i.get('exhibition_id')]}}).to_list()\n", " exhibitions = await exhibition_collection.find({'_id': {'$in': [ObjectId(i.get('exhibition_id')) for i in data if i.get('exhibition_id')]}}).sort(\"_id\", -1).to_list()\n",
" competitions = await competitions_col.find({'_id': {'$in': [i.get('competition_id') for i in data if i.get('competition_id')]}}).to_list()\n", " competitions = await competitions_col.find({'_id': {'$in': [i.get('competition_id') for i in data if i.get('competition_id')]}}).sort(\"_id\", -1).to_list()\n",
" return templates.TemplateResponse(\n", " return templates.TemplateResponse(\n",
" request=request,\n", " request=request,\n",
" name=\"profile/delivery.html\",\n", " name=\"profile/delivery.html\",\n",

View File

@ -3818,8 +3818,8 @@ async def profile_delivery(
data = [doc async for doc in get_delivery_aggregate(_match)] data = [doc async for doc in get_delivery_aggregate(_match)]
exhibitions = await exhibition_collection.find({'_id': {'$in': [ObjectId(i.get('exhibition_id')) for i in data if i.get('exhibition_id')]}}).to_list() exhibitions = await exhibition_collection.find({'_id': {'$in': [ObjectId(i.get('exhibition_id')) for i in data if i.get('exhibition_id')]}}).sort("_id", -1).to_list()
competitions = await competitions_col.find({'_id': {'$in': [i.get('competition_id') for i in data if i.get('competition_id')]}}).to_list() competitions = await competitions_col.find({'_id': {'$in': [i.get('competition_id') for i in data if i.get('competition_id')]}}).sort("_id", -1).to_list()
return templates.TemplateResponse( return templates.TemplateResponse(
request=request, request=request,
name="profile/delivery.html", name="profile/delivery.html",