Include Chris's decisions in notification of council uploads
This commit is contained in:
parent
114e973cb5
commit
efffaa9f98
@ -47,21 +47,24 @@ def update_other_applications():
|
|||||||
print(" Number of existing applications: " + str(len(weekly_list.existing_applications)))
|
print(" Number of existing applications: " + str(len(weekly_list.existing_applications)))
|
||||||
print("")
|
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")
|
_cursor.execute("SELECT reference FROM applications WHERE caseOfficer IS NULL")
|
||||||
newly_decided_applications = _cursor.fetchall()
|
newly_decided_applications = _cursor.fetchall()
|
||||||
|
|
||||||
|
chris_decisions = 0
|
||||||
if len(newly_decided_applications) > 0:
|
if len(newly_decided_applications) > 0:
|
||||||
print(f"Scrape Newly Decided Applications: {len(newly_decided_applications)}")
|
print(f"Scrape Newly Decided Applications: {len(newly_decided_applications)}")
|
||||||
|
|
||||||
for (application_ref, ) in newly_decided_applications:
|
for (application_ref, ) in newly_decided_applications:
|
||||||
_app = Application(_cursor, application_ref)
|
_app = Application(_cursor, application_ref)
|
||||||
_app.scrape_portal(_browser)
|
_app.scrape_portal(_browser)
|
||||||
|
if _app.caseOfficer is "Christopher Masters":
|
||||||
|
chris_decisions += 1
|
||||||
|
|
||||||
print("")
|
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
|
return there_were_newly_decided_applications
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user