Skip to content

Commit

Permalink
Handle missing patternText field (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Aug 28, 2023
1 parent a0a8090 commit 4b7da38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ttss/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def extract_stop_passages_list(passages: List[Dict[str, Any]], /, *,


def extract_stop_passage(passage: Dict[str, Any], /, *, stop: Stop, now: datetime, old: bool) -> Passage:
route = Route(id=passage['routeId'], name=passage['patternText'])
route = Route(id=passage['routeId'], name=passage['patternText'] if 'patternText' in passage else None)

trip = Trip(id=passage['tripId'],
route=route,
Expand Down

0 comments on commit 4b7da38

Please sign in to comment.