Sfoglia il codice sorgente

fix: negative total durations should not be possible

main
Rob Hallam 2 mesi fa
parent
commit
15ca7cb6fa
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      pipeline/adjusters.py

+ 4
- 0
pipeline/adjusters.py Vedi File

@@ -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:


Caricamento…
Annulla
Salva