Skip to content

Commit

Permalink
fix progress value
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed May 26, 2023
1 parent d8698f4 commit ce3b03f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -847,9 +847,8 @@ async def add_project_states_for_user(
node_state.json(by_alias=True, exclude_unset=True)
)
prj_node.setdefault("state", {}).update(node_state_dict)
prj_node.update(
{"progress": round(node_state_dict.get("progress", 0) * 100.0)}
)
prj_node_progress = node_state_dict.get("progress", None) or 0
prj_node.update({"progress": round(prj_node_progress * 100.0)})

project["state"] = ProjectState(
locked=lock_state, state=ProjectRunningState(value=running_state)
Expand Down

0 comments on commit ce3b03f

Please sign in to comment.