Skip to content

Commit

Permalink
Update consent query for name-examination search (#1516)
Browse files Browse the repository at this point in the history
* Merge branch 'main' of https://github.com/eve-git/namex into main

* update consent query for search
  • Loading branch information
eve-git authored Mar 20, 2024
1 parent 0478cc7 commit bc7e19c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/namex/VERSION.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '1.1.50'
__version__ = '1.1.51'

6 changes: 4 additions & 2 deletions api/namex/resources/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,13 @@ def get(*args, **kwargs):
q = q.join(RequestDAO.applicants).filter(Applicant.lastName.ilike('%' + lastName + '%'))

if consentOption == 'Received':
q = q.filter(or_(RequestDAO.consentFlag == 'R', RequestDAO.consent_dt.isnot(None)))
q = q.filter(RequestDAO.consentFlag == 'R')
if consentOption == 'Yes':
q = q.filter(RequestDAO.consentFlag == 'Y')
elif consentOption == 'Waived':
q = q.filter(RequestDAO.consentFlag == 'N')
elif consentOption == 'No':
q = q.filter(and_(RequestDAO.consentFlag == 'N', RequestDAO.consent_dt == None))
q = q.filter(RequestDAO.consentFlag.is_(None))

if priority == 'Standard':
q = q.filter(RequestDAO.priorityCd != 'Y')
Expand Down

0 comments on commit bc7e19c

Please sign in to comment.