Skip to content

Commit

Permalink
Get provinces
Browse files Browse the repository at this point in the history
  • Loading branch information
j-norwood-young committed May 11, 2014
1 parent 025e376 commit b4c87e1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions get_latest_iec.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,10 @@ def refresh_item(ballot, demarc, uid):
calculate_national("2014", 291)
elif (len(sys.argv) == 3):
if (sys.argv[1] == "province"):
calculate_province([sys.argv[2]], "2014", 291)
calculate_province([sys.argv[2]], "2014", 292)
provinces = db.session.query(Province).filter(Province.year == "2014").all()
for province in provinces:
calculate_province([province.pk], "2014", 291)
calculate_province([province.pk], "2014", 292)
if (sys.argv[1] == "municipality"):
if (sys.argv[2] == "all"):
municipalities = db.session.query(Municipality).filter(Municipality.year == "2014").all()
Expand Down

0 comments on commit b4c87e1

Please sign in to comment.