convert the start hour to integer

This commit is contained in:
deflax 2024-06-24 11:43:43 +00:00
parent 29725ea4fa
commit db59680ff6

View file

@ -127,7 +127,7 @@ def fallback_search(database):
scheduled_hours.append(value['start_at'])
# convert the scheduled hours to a circular list
scheduled_hours = scheduled_hours + [h + 24 for int(h) in scheduled_hours]
scheduled_hours = scheduled_hours + [int(h) + 24 for h in scheduled_hours]
# find the closest scheduled hour
closest_hour = min(scheduled_hours, key=lambda x: abs(x - current_hour))