Skip to content

Commit

Permalink
Handle missing patternText field
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw authored Jul 20, 2023
1 parent 330003f commit 0624775
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 @@ -98,7 +98,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 0624775

Please sign in to comment.