From e21f553cd3fb4c28a31d93aecd2a69dbd0b80a7a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Feb 2024 13:35:52 -0800 Subject: [PATCH] fix env data type issue --- .../request_api/services/unopenedreportservice.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/request-management-api/request_api/services/unopenedreportservice.py b/request-management-api/request_api/services/unopenedreportservice.py index f57cced92..685c47cf5 100644 --- a/request-management-api/request_api/services/unopenedreportservice.py +++ b/request-management-api/request_api/services/unopenedreportservice.py @@ -22,8 +22,8 @@ class unopenedreportservice: def generateunopenedreport(self): - startdate = date.today() - timedelta(days=self.dayscutoff) - enddate = startdate + timedelta(days=self.waitdays) + startdate = date.today() - timedelta(days=int(self.dayscutoff)) + enddate = startdate + timedelta(days=int(self.waitdays)) requests = FOIRawRequest.getunopenedunactionedrequests(str(startdate), str(enddate)) alerts = [] for request in requests: @@ -79,6 +79,7 @@ def generateemailhtml(self, alerts): Description """ + firstrank2 = True for alert in alerts: if alert.get('potentialmatches', False): emailhtml += ''' @@ -91,7 +92,6 @@ def generateemailhtml(self, alerts): ''' else: - firstrank2 = True if firstrank2: emailhtml += """

Rank 2: Possibly unactioned — requests found but some applicant info is mismatching — please double check

@@ -106,6 +106,8 @@ def generateemailhtml(self, alerts): """ firstrank2 = False + if alert['potentialmatches']['highscore'] < float(self.jarocutoff): + break emailhtml += ''' U-000''' + alert['request']['requestid'] + '''