From 002235b6f63d71e304ca2f62022106210175257f346d9522e76d913599528d5f Mon Sep 17 00:00:00 2001 From: vladislav Date: Mon, 7 Sep 2026 12:34:35 -0400 Subject: [PATCH] fix --- main.ipynb | 3 ++- main.py | 3 ++- vk.py | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/main.ipynb b/main.ipynb index ad328d4..04dd2ca 100644 --- a/main.ipynb +++ b/main.ipynb @@ -1535,7 +1535,8 @@ " ]\n", "\n", " cursor = competition_request_col.aggregate(pipeline)\n", - " return await cursor.to_list(length=None)" + " data = await cursor.to_list(length=None)\n", + " return await posts_collection.find({\"_id\": {\"$in\":[ ObjectId(doc['_id']) if type(doc['_id']) is str else doc['_id'] for doc in data ]}}).to_list()" ], "display_name": ".venv" }, diff --git a/main.py b/main.py index cd32f21..ea1556a 100644 --- a/main.py +++ b/main.py @@ -1186,7 +1186,8 @@ async def get_unique_posts_by_user( ] cursor = competition_request_col.aggregate(pipeline) - return await cursor.to_list(length=None) + data = await cursor.to_list(length=None) + return await posts_collection.find({"_id": {"$in":[ ObjectId(doc['_id']) if type(doc['_id']) is str else doc['_id'] for doc in data ]}}).to_list() async def get_unique_posts_с(competition_request_col: AsyncIOMotorCollection, competition_id: str, finish: bool = False) -> List[Any]: match_criteria = { diff --git a/vk.py b/vk.py index 079e182..fadb241 100644 --- a/vk.py +++ b/vk.py @@ -188,6 +188,7 @@ async def send_vk(data:dict, request: Request): return {"ok": True} + # TODO: function call like send_tg from tg.py (without router) @router.post("/edit") async def edit_vk(data:dict, request: Request): @@ -257,6 +258,7 @@ async def edit_vk(data:dict, request: Request): return {"ok": True} + # TODO: function call like send_tg from tg.py (without router) @router.post("/delete") async def wall_delete(data: dict, request: Request):