Skip to content

Commit

Permalink
task/WP-698: NCO text search made case insensitive (#1478)
Browse files Browse the repository at this point in the history
* adding i flag to regex searches for text field

* fixing linting formatting issues

* Revert "fixing linting formatting issues"

This reverts commit 2b92fb4.

---------

Co-authored-by: Jake Rosenberg <jrosenberg@tacc.utexas.edu>
  • Loading branch information
SilversunKSauri and jarosenb authored Oct 23, 2024
1 parent 0b4e97b commit aaead94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions designsafe/apps/nco/managers/ttc_grants.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ def ttc_grants(self, params=None):
query['Type'] = params['grant_type']
if params['text_search']:
query['$or'] = [
{'Title': {'$regex': params['text_search']}},
{'Abstract': {'$regex': params['text_search']}},
{'PiName': {'$regex': params['text_search']}},
{'Title': {'$regex': params['text_search'], '$options': 'i'}},
{'Abstract': {'$regex': params['text_search'], '$options': 'i'}},
{'PiName': {'$regex': params['text_search'], '$options': 'i'}},
]

#get the grants list
Expand Down

0 comments on commit aaead94

Please sign in to comment.