Skip to content

Commit ebb2693

Browse files
committed
Convert date to string upstream
1 parent b79eca7 commit ebb2693

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

openstates/cli/update.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def do_scrape(
103103
]
104104
)
105105

106-
last_scrape_datetime = DAG_RUN_START or datetime.datetime.utcnow()
106+
last_scrape_datetime = DAG_RUN_START or datetime.datetime.utcnow().isoformat()
107107
for scraper_name, scrape_args in scrapers.items():
108108
ScraperCls = juris.scrapers[scraper_name]
109109
if (
@@ -206,7 +206,7 @@ def do_scrape(
206206

207207

208208
def archive_to_cloud_storage(
209-
datadir: str, juris: State, last_scrape_datetime: datetime.datetime
209+
datadir: str, juris: State, last_scrape_datetime: str
210210
) -> None:
211211
# check if we have necessary settings
212212
if GCP_PROJECT is None or BUCKET_NAME is None:
@@ -223,7 +223,7 @@ def archive_to_cloud_storage(
223223
bucket = cloud_storage_client.bucket(BUCKET_NAME)
224224
jurisdiction_id = juris.jurisdiction_id.replace("ocd-jurisdiction/", "")
225225
destination_prefix = (
226-
f"{SCRAPE_LAKE_PREFIX}/{jurisdiction_id}/{last_scrape_datetime.isoformat()}"
226+
f"{SCRAPE_LAKE_PREFIX}/{jurisdiction_id}/{last_scrape_datetime}"
227227
)
228228

229229
# read files in directory and upload

0 commit comments

Comments
 (0)