Adds a to_datetime util to coerce these date objects to date time objects where needed, predominantly in feeds.py.
We should treat this as a breaking change, in case downstream instances do anything with the last action date, e.g., in the Chicago search index definition.
Also, we should do this for memberships, too, but I want to do that separately for the sake of a neat diff and an expedient fix for action dates, which are displayed in lots of places, now. Opened #273 to track that work.
Testing instructions
N.b., I've already done this.
Spin up a local version of Metro Councilmatic. View a board report with actions, noting the date.
Install this version of django-councilmatic into a local install of Metro Councilmatic. Refresh the board report page and confirm that the date is one day later, i.e., the correct date. (You can verify this by calling up the board report in a Python shell.)
Description
Bill action dates come to us as date strings. Originally, we cast them to date times, but this caused issues, as described in https://github.com/datamade/la-metro-councilmatic/issues/638.
This PR:
last_action_date
to aDateField
.to_datetime
util to coerce these date objects to date time objects where needed, predominantly infeeds.py
.We should treat this as a breaking change, in case downstream instances do anything with the last action date, e.g., in the Chicago search index definition.
Also, we should do this for memberships, too, but I want to do that separately for the sake of a neat diff and an expedient fix for action dates, which are displayed in lots of places, now. Opened #273 to track that work.
Testing instructions
N.b., I've already done this.
django-councilmatic
into a local install of Metro Councilmatic. Refresh the board report page and confirm that the date is one day later, i.e., the correct date. (You can verify this by calling up the board report in a Python shell.)