Skip to content

Commit c87bb0c

Browse files
Fix bug
1 parent fa65ff9 commit c87bb0c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

policyengine_api/compute_api/compute_api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,10 @@ def score_policy_reform_against_baseline(
124124
)
125125
if reform_impact is not None:
126126
start_time_str = reform_impact.get("start_time")
127-
start_time = datetime.datetime.strptime(
128-
start_time_str, "%Y-%m-%d %H:%M:%S.%f"
129-
)
127+
if isinstance(start_time_str, str):
128+
start_time = datetime.datetime.strptime(
129+
start_time_str, "%Y-%m-%d %H:%M:%S.%f"
130+
)
130131
# If the computation has been running for more than 5 minutes, restart it
131132
outdated = (
132133
reform_impact.get("status") == "computing"

0 commit comments

Comments
 (0)