Skip to content

Commit

Permalink
Merge pull request #459 from tijlleenders/tijl/-/update-scheduler-202…
Browse files Browse the repository at this point in the history
…4-03-26

Tijl/-/update-scheduler-2024-03-26
  • Loading branch information
tijlleenders authored Mar 26, 2024
2 parents 737b03d + 89fd07b commit fde4c80
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/services/activity_generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,12 @@ pub(crate) fn get_base_activities(calendar: &Calendar, goals: &[Goal]) -> Vec<Ac
.filter(|child| goal.children.clone().unwrap().contains(&child.id))
.collect();
for c in children {
activity.min_block_size -= c.min_duration.unwrap();
activity.max_block_size -= c.min_duration.unwrap();
activity.total_duration -= c.min_duration.unwrap();
activity.duration_left -= c.min_duration.unwrap();
if let Some(child_duration) = c.min_duration {
activity.min_block_size -= child_duration;
activity.max_block_size -= child_duration;
activity.total_duration -= child_duration;
activity.duration_left -= child_duration;
}
}
}
activities.append(&mut temp_activities);
Expand Down

0 comments on commit fde4c80

Please sign in to comment.