From c2c7b034b6f7c509a396efb2dbb6d6889926d693 Mon Sep 17 00:00:00 2001 From: Valentin CZERYBA Date: Sat, 21 Dec 2024 20:47:33 +0100 Subject: [PATCH] add fix tags --- app/routers/events.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/routers/events.py b/app/routers/events.py index 39dfd82..bd18654 100644 --- a/app/routers/events.py +++ b/app/routers/events.py @@ -159,7 +159,7 @@ async def search_events( date_event: Union[datetime, None] = None, start_date: Union[datetime, None] = None, end_date: Union[datetime, None] = None, - tags: Union[list[str], None] = None, + tags: Union[str, None] = None, ): if limit < 1 or skip < 0 or limit < skip: raise HTTPException( @@ -193,7 +193,7 @@ async def search_events( filters.append(text_filter) if tags is not None: - filters.append({"tags": {"$in": tags}}) + filters.append({"tags": {"$eq": tags}}) # Combine filters object_search = {"$and": filters} if filters else {} -- 2.47.1