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)
states = []
disruption = {}
for disruption in weather[mode][line]:
status = "past"
for ap in disruption["applicationPeriods"]:
@ -439,7 +440,7 @@ class RATPWeatherModule:
state = ""
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"
state = "_trafic_grand"
elif "PERTURBEE" in states: