Skip to content

Commit

Permalink
Merge pull request #5046 from bcgov/test-marshal-NK-2860
Browse files Browse the repository at this point in the history
fix env data type issue
  • Loading branch information
nkan-aot2 authored Feb 8, 2024
2 parents b127088 + e21f553 commit fdc8500
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -79,6 +79,7 @@ def generateemailhtml(self, alerts):
<th>Description</th>
</tr>
"""
firstrank2 = True
for alert in alerts:
if alert.get('potentialmatches', False):
emailhtml += '''
Expand All @@ -91,7 +92,6 @@ def generateemailhtml(self, alerts):
</tr>
'''
else:
firstrank2 = True
if firstrank2:
emailhtml += """</table>
<p><b>Rank 2:</b> Possibly unactioned — requests found but some applicant info is mismatching — please double check</p>
Expand All @@ -106,6 +106,8 @@ def generateemailhtml(self, alerts):
</tr>
"""
firstrank2 = False
if alert['potentialmatches']['highscore'] < float(self.jarocutoff):
break
emailhtml += '''
<tr>
<td>U-000''' + alert['request']['requestid'] + '''</td>
Expand Down

0 comments on commit fdc8500

Please sign in to comment.