Trip.duration and Trip.real_time_duration are now nullable
This commit is contained in:
parent
19971e6e71
commit
9e12b53c3b
@ -19,8 +19,10 @@ class Trip:
|
||||
self.index: int = data["idx"]
|
||||
self.id: str = data["tripId"]
|
||||
self.ctx_recon: str = data["ctxRecon"]
|
||||
self.duration: Union[Duration, timedelta] = parse_duration(data["duration"])
|
||||
self.real_time_duration: Union[Duration, timedelta] = (
|
||||
self.duration: Union[Duration, timedelta, None] = (
|
||||
None if "duration" not in data else parse_duration(data["duration"])
|
||||
)
|
||||
self.real_time_duration: Union[Duration, timedelta, None] = (
|
||||
None if "rtDuration" not in data else parse_duration(data["rtDuration"])
|
||||
)
|
||||
self.checksum: str = data["checksum"]
|
||||
|
Loading…
Reference in New Issue
Block a user