Include Chris's decisions in notification of council uploads

This commit is contained in:
James Jennett-Wheeler 2025-06-23 15:53:50 +01:00
parent 114e973cb5
commit 203e8c9a1e

View File

@ -47,21 +47,24 @@ def update_other_applications():
print(" Number of existing applications: " + str(len(weekly_list.existing_applications)))
print("")
if there_were_newly_decided_applications:
notify("New decisions found", f"Council has uploaded {len(weekly_list.new_applications)} new decisions")
_cursor.execute("SELECT reference FROM applications WHERE caseOfficer IS NULL")
newly_decided_applications = _cursor.fetchall()
chris_decisions = 0
if len(newly_decided_applications) > 0:
print(f"Scrape Newly Decided Applications: {len(newly_decided_applications)}")
for (application_ref, ) in newly_decided_applications:
_app = Application(_cursor, application_ref)
_app.scrape_portal(_browser)
if _app.caseOfficer == "Christopher Masters":
chris_decisions += 1
print("")
if there_were_newly_decided_applications:
notify("New decisions found", f"Council has uploaded {len(weekly_list.new_applications)} new decisions ({chris_decisions} by Chris)")
return there_were_newly_decided_applications
if __name__ == '__main__':