Parcourir la source

fix: negative total durations should not be possible

main
Rob Hallam il y a 2 mois
Parent
révision
15ca7cb6fa
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. +4
    -0
      pipeline/adjusters.py

+ 4
- 0
pipeline/adjusters.py Voir le fichier

@@ -55,6 +55,10 @@ class TargetTimeAdjuster(Adjuster):
target_time_max = time + (time * margin / 100)
target_time_min = time - (time * margin / 100)

# ensure we don't have negative times
if type(target_time_min) is float and target_time_min < 0:
target_time_min = 0.0

return (target_time_min, target_time_max)

def _features_total_time(self, features: list) -> float:


Chargement…
Annuler
Enregistrer