Skip to content

Commit

Permalink
minor add
Browse files Browse the repository at this point in the history
  • Loading branch information
fpurcell committed Sep 10, 2016
1 parent 523e3c0 commit ff1e555
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions gtfsdb/model/route_stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,15 @@ def unique_routes_at_stop(cls, session, stop_id, agency_id=None, date=None, rout
ret_val.append(rs.route)
return ret_val

@classmethod
def active_unique_routes_at_stop(cls, session, stop_id, agency_id=None, date=None, route_name_filter=False):
''' to filter active routes, just provide a date to the above unique_routes_at_stop method
'''
# make sure date is not null...
if date is None or not isinstance(date, datetime.date):
date = datetime.date.today()
return cls.unique_routes_at_stop(session, stop_id, agency_id, date, route_name_filter)

@classmethod
def active_stops(cls, session, route_id, direction_id=None, agency_id=None, date=None):
''' returns list of routes that are seen as 'active' based on dates and filters
Expand Down

0 comments on commit ff1e555

Please sign in to comment.