Skip to content

Commit 89e6fb5

Browse files
authored
Merge pull request #13 from openstates/update-vote-event-model
Fix length error
2 parents 111a3bf + 0013145 commit 89e6fb5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

models/vote_event.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SELECT
2323
motion_classification::TEXT[] AS motion_classification,
2424
CASE
2525
WHEN start_date = '' THEN NULL
26-
WHEN LENGTH(start_date) = 10 THEN STRPTIME(start_date, '%Y-%m-%d')
26+
WHEN LENGTH(CAST(start_date AS VARCHAR)) = 10 THEN STRPTIME(start_date, '%Y-%m-%d')
2727
ELSE STRPTIME(start_date, '%Y-%m-%dT%H:%M:%S%z') -- CA, CO, FL, OR, PA, IA, WI, USA, NY, NV, NJ, NE, NC, ND, MO, IN,
2828
END AS start_date,
2929
result::TEXT AS result,

0 commit comments

Comments
 (0)