Fixed messages attribute
This commit is contained in:
parent
9641a4dab8
commit
a868c997ac
@ -14,7 +14,7 @@ class Leg():
|
||||
self.gis = Gis(data["GisRef"]["ref"], data["GisRoute"])
|
||||
else:
|
||||
self.gis = None
|
||||
|
||||
|
||||
self.index = data["idx"]
|
||||
self.name = data["name"]
|
||||
self.type = data["type"]
|
||||
@ -25,8 +25,9 @@ class Leg():
|
||||
self.direction = None
|
||||
|
||||
self.messages = []
|
||||
for message in data["Messages"]["Message"]:
|
||||
self.messages.append(Message(message))
|
||||
if "Messages" in data:
|
||||
for message in data["Messages"]["Message"]:
|
||||
self.messages.append(Message(message))
|
||||
|
||||
if "number" in data:
|
||||
self.number = data["number"]
|
||||
|
Loading…
Reference in New Issue
Block a user