Skip to content

Commit

Permalink
Update gtfs_rt_helper.py
Browse files Browse the repository at this point in the history
  • Loading branch information
vingerha committed Apr 28, 2024
1 parent a7fc5ea commit dceb7db
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions custom_components/gtfs2/gtfs_rt_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,10 @@ def convert_gtfs_realtime_alerts_to_json(gtfs_realtime_data):
informed_entities = []
for informed_entity in entity.alert.informed_entity:
informed_entity_json = {
"agency_id": informed_entity.agency_id,
"route_id": informed_entity.route_id,
"trip_id": informed_entity.trip.trip_id
}
informed_entities.append(informed_entity_json)
_LOGGER.debug("Alert Informed entities: %s", informed_entities)
entity_dict = {
"alert": {
"id": entity.id,
Expand All @@ -510,5 +508,5 @@ def convert_gtfs_realtime_alerts_to_json(gtfs_realtime_data):
}
}
json_data["entity"].append(entity_dict)
_LOGGER.debug("Alert entity JSON: %s", json_data["entity"])
_LOGGER.debug("Alert entity JSON: %s", json_data["entity"])
return json_data

0 comments on commit dceb7db

Please sign in to comment.