add fix tags #35
@ -159,7 +159,7 @@ async def search_events(
|
|||||||
date_event: Union[datetime, None] = None,
|
date_event: Union[datetime, None] = None,
|
||||||
start_date: Union[datetime, None] = None,
|
start_date: Union[datetime, None] = None,
|
||||||
end_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:
|
if limit < 1 or skip < 0 or limit < skip:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
@ -193,7 +193,7 @@ async def search_events(
|
|||||||
filters.append(text_filter)
|
filters.append(text_filter)
|
||||||
|
|
||||||
if tags is not None:
|
if tags is not None:
|
||||||
filters.append({"tags": {"$in": tags}})
|
filters.append({"tags": {"$eq": tags}})
|
||||||
|
|
||||||
# Combine filters
|
# Combine filters
|
||||||
object_search = {"$and": filters} if filters else {}
|
object_search = {"$and": filters} if filters else {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user