From bc7e19c15184bce834626e62dd0e6e02b5749125 Mon Sep 17 00:00:00 2001 From: eve-git <54647458+eve-git@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:08:06 -0700 Subject: [PATCH] Update consent query for name-examination search (#1516) * Merge branch 'main' of https://github.com/eve-git/namex into main * update consent query for search --- api/namex/VERSION.py | 2 +- api/namex/resources/requests.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/namex/VERSION.py b/api/namex/VERSION.py index eb08b57ba..bfcacd6d7 100644 --- a/api/namex/VERSION.py +++ b/api/namex/VERSION.py @@ -1,2 +1,2 @@ -__version__ = '1.1.50' +__version__ = '1.1.51' diff --git a/api/namex/resources/requests.py b/api/namex/resources/requests.py index b7c1dfad5..91a51f168 100644 --- a/api/namex/resources/requests.py +++ b/api/namex/resources/requests.py @@ -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')