fix events

This commit is contained in:
2024-03-30 23:31:31 +01:00
parent 9ee7f1cf3a
commit 06b50247fd
2 changed files with 6 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ async def read_events(authorize: Annotated[bool, Depends(permissions_checker.Per
if status is not None:
object_search = {"status":{"$eq": status}}
if id_event is not None:
eventid = ObjectId(id_event)
eventid = ObjectId(eventid)
object_search = {"id": {"$regex": userid}}
if status is not None:
object_search = {"$and":[{"id":{"$regex": eventid}}, {"status":{"$eq":status}}]}