Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Dec 15, 2022
1 parent fa65ff9 commit c87bb0c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions policyengine_api/compute_api/compute_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ def score_policy_reform_against_baseline(
)
if reform_impact is not None:
start_time_str = reform_impact.get("start_time")
start_time = datetime.datetime.strptime(
start_time_str, "%Y-%m-%d %H:%M:%S.%f"
)
if isinstance(start_time_str, str):
start_time = datetime.datetime.strptime(
start_time_str, "%Y-%m-%d %H:%M:%S.%f"
)
# If the computation has been running for more than 5 minutes, restart it
outdated = (
reform_impact.get("status") == "computing"
Expand Down

0 comments on commit c87bb0c

Please sign in to comment.