Attempt to temporarily fix #2
This commit is contained in:
@@ -2,6 +2,7 @@ from typing import Any, Mapping
|
||||
|
||||
from pyrmv.classes.message import Message
|
||||
from pyrmv.classes.stop import Stop
|
||||
from pyrmv.utility import ref_upgrade
|
||||
|
||||
|
||||
class Journey:
|
||||
@@ -9,7 +10,11 @@ class Journey:
|
||||
|
||||
def __init__(self, data: Mapping[str, Any]):
|
||||
self.stops = []
|
||||
self.ref = data["ref"]
|
||||
|
||||
# Upgrade is temporarily used due to RMV API mismatch
|
||||
# self.ref = data["ref"]
|
||||
self.ref = ref_upgrade(data["ref"])
|
||||
|
||||
self.direction = data["Directions"]["Direction"][0]["value"]
|
||||
self.direction_flag = data["Directions"]["Direction"][0]["flag"]
|
||||
self.stops.extend(Stop(stop) for stop in data["Stops"]["Stop"])
|
||||
|
Reference in New Issue
Block a user