add options i
This commit is contained in:
parent
721d7a3a5d
commit
7f34e835e3
@ -147,9 +147,9 @@ async def read_events(authorize: Annotated[bool, Depends(permissions_checker.Per
|
||||
{"start_date": {"$lte": end_of_day}}
|
||||
]}
|
||||
if name is not None:
|
||||
object_search = {"$and":[{"name":{"$regex": name}}, {"status":{"$eq":status}}]}
|
||||
object_search = {"$and":[{"name":{"$regex": name, '$options': 'i'}}, {"status":{"$eq":status}}]}
|
||||
if current_datetime is not None:
|
||||
object_search = {"$and":[{"name":{"$regex": name}},
|
||||
object_search = {"$and":[{"name":{"$regex": name, '$options': 'i'}},
|
||||
{"status":{"$eq":status}},
|
||||
{
|
||||
"$or": [
|
||||
@ -165,7 +165,7 @@ async def read_events(authorize: Annotated[bool, Depends(permissions_checker.Per
|
||||
}
|
||||
]}
|
||||
if date_selected is True:
|
||||
object_search = {"$and":[{"name":{"$regex": name}},
|
||||
object_search = {"$and":[{"name":{"$regex": name, '$options': 'i'}},
|
||||
{"status":{"$eq":status}},
|
||||
{"start_date": {"$gte": start_of_day}},
|
||||
{"start_date": {"$lte": end_of_day}}
|
||||
@ -270,9 +270,9 @@ async def search_events(authorize: Annotated[bool, Depends(permissions_checker.P
|
||||
"$and": [
|
||||
{
|
||||
"$or": [
|
||||
{"name": {"$regex": item}},
|
||||
{"name": {"$regex": item, "$options": 'i'}},
|
||||
{"tags": {"$regex": item}},
|
||||
{"organizers": {"$regex": item}}
|
||||
{"organizers": {"$regex": item, "$options": 'i'}}
|
||||
]
|
||||
},
|
||||
{"status": {"$eq": status}}
|
||||
@ -283,9 +283,9 @@ async def search_events(authorize: Annotated[bool, Depends(permissions_checker.P
|
||||
"$and": [
|
||||
{
|
||||
"$or": [
|
||||
{"name": {"$regex": item}},
|
||||
{"name": {"$regex": item, "$options": 'i'}},
|
||||
{"tags": {"$regex": item}},
|
||||
{"organizers": {"$regex": item}}
|
||||
{"organizers": {"$regex": item, "$options": 'i'}}
|
||||
]
|
||||
},
|
||||
{"status": {"$eq": status}},
|
||||
@ -308,9 +308,9 @@ async def search_events(authorize: Annotated[bool, Depends(permissions_checker.P
|
||||
"$and": [
|
||||
{
|
||||
"$or": [
|
||||
{"name": {"$regex": item}},
|
||||
{"name": {"$regex": item, "$options": 'i'}},
|
||||
{"tags": {"$regex": item}},
|
||||
{"organizers": {"$regex": item}}
|
||||
{"organizers": {"$regex": item, "$options": 'i'}}
|
||||
]
|
||||
},
|
||||
{"status": {"$eq": status}},
|
||||
@ -323,9 +323,9 @@ async def search_events(authorize: Annotated[bool, Depends(permissions_checker.P
|
||||
"$and": [
|
||||
{
|
||||
"$or": [
|
||||
{"name": {"$regex": item}},
|
||||
{"name": {"$regex": item, "$options": 'i'}},
|
||||
{"tags": {"$regex": item}},
|
||||
{"organizers": {"$regex": item}}
|
||||
{"organizers": {"$regex": item, "$options": 'i'}}
|
||||
]
|
||||
},
|
||||
{"status": {"$eq": status}},
|
||||
@ -348,9 +348,9 @@ async def search_events(authorize: Annotated[bool, Depends(permissions_checker.P
|
||||
"$and": [
|
||||
{
|
||||
"$or": [
|
||||
{"name": {"$regex": item}},
|
||||
{"name": {"$regex": item, "$options": 'i'}},
|
||||
{"tags": {"$regex": item}},
|
||||
{"organizers": {"$regex": item}}
|
||||
{"organizers": {"$regex": item, "$options": 'i'}}
|
||||
]
|
||||
},
|
||||
{"status": {"$eq": status}},
|
||||
@ -385,9 +385,9 @@ async def search_events(authorize: Annotated[bool, Depends(permissions_checker.P
|
||||
"$and": [
|
||||
{
|
||||
"$or": [
|
||||
{"name": {"$regex": item}},
|
||||
{"name": {"$regex": item, "$options": 'i'}},
|
||||
{"tags": {"$regex": item}},
|
||||
{"organizers": {"$regex": item}}
|
||||
{"organizers": {"$regex": item, "$options": 'i'}}
|
||||
]
|
||||
},
|
||||
{"status": {"$eq": status}},
|
||||
|
Loading…
x
Reference in New Issue
Block a user