fix search

This commit is contained in:
Rachid Mrad 2024-10-11 16:15:38 -04:00
parent b683bb1d45
commit 1aaafb205a
No known key found for this signature in database

View file

@ -89,9 +89,9 @@ def apply_search(data_list, request):
data_list = [
item
for item in data_list
if search_term in item.get("first_name", "").lower()
or search_term in item.get("last_name", "").lower()
or search_term in item.get("email", "").lower()
if item.get("first_name", "") and search_term in item.get("first_name", "").lower()
or item.get("last_name", "") and search_term in item.get("last_name", "").lower()
or item.get("email", "") and search_term in item.get("email", "").lower()
]
return data_list