light modification

This commit is contained in:
mr
2025-01-22 14:13:10 +01:00
parent ed1e761052
commit e9278111a6
2 changed files with 5 additions and 2 deletions

View File

@@ -33,7 +33,7 @@ func GetPlannerLongestTime(end *time.Time, planned map[tools.DataType][]pricing.
continue
}
newS := priced.GetLocationEnd()
if longestTime < newS.Sub(*end).Seconds() {
if end == nil && longestTime < newS.Sub(*end).Seconds() {
longestTime = newS.Sub(*end).Seconds()
}
// get the nearest start from start var