Skip to content

Commit

Permalink
Merge pull request #984 from Pythagora-io/fix-load-crash
Browse files Browse the repository at this point in the history
don't send task progress on project load if there's no current task
  • Loading branch information
LeonOstrez authored May 31, 2024
2 parents 88ba3f5 + 68ccbfe commit b9becc8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions core/state/state_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,14 @@ async def load_project(
self.branch = state.branch
self.project = state.branch.project
self.next_state = await state.create_next_state()
# TODO: overwrite files?
self.file_system = await self.init_file_system(load_existing=True)
log.debug(
f"Loaded project {self.project} ({self.project.id}) "
f"branch {self.branch} ({self.branch.id}"
f"step {state.step_index} (state id={state.id})"
)

if self.current_state.current_epic and self.ui:
if self.current_state.current_epic and self.current_state.current_task and self.ui:
await self.ui.send_task_progress(
self.current_state.tasks.index(self.current_state.current_task) + 1,
len(self.current_state.tasks),
Expand Down

0 comments on commit b9becc8

Please sign in to comment.