Fix ratp disruption issue

This commit is contained in:
nemunaire 2024-09-16 06:57:37 +02:00
parent f7f97595f2
commit 27314c0c45

View File

@ -414,6 +414,7 @@ class RATPWeatherModule:
align_y += int(1.5 * line_height) align_y += int(1.5 * line_height)
states = [] states = []
disruption = {}
for disruption in weather[mode][line]: for disruption in weather[mode][line]:
status = "past" status = "past"
for ap in disruption["applicationPeriods"]: for ap in disruption["applicationPeriods"]:
@ -439,7 +440,7 @@ class RATPWeatherModule:
state = "" state = ""
fill = "darkgray" fill = "darkgray"
if disruption["scope"] == "line" and ("NO_SERVICE" in states or "BLOQUANTE" in states): if "scope" in disruption and disruption["scope"] == "line" and ("NO_SERVICE" in states or "BLOQUANTE" in states):
fill = "black" fill = "black"
state = "_trafic_grand" state = "_trafic_grand"
elif "PERTURBEE" in states: elif "PERTURBEE" in states: