From efffaa9f9836a3ce4d96ba151c9ff83f4ed359cf Mon Sep 17 00:00:00 2001 From: James Jennett-Wheeler Date: Mon, 23 Jun 2025 15:53:50 +0100 Subject: [PATCH] Include Chris's decisions in notification of council uploads --- app/monitor-planning.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/monitor-planning.py b/app/monitor-planning.py index 232f22a..67465ef 100644 --- a/app/monitor-planning.py +++ b/app/monitor-planning.py @@ -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 is "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__':