Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
elsholz committed Jan 15, 2024
1 parent 3205d14 commit b1c1ab6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/code/metroplanner_api/v1/endpoints/_plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,16 +299,16 @@ def get_plan(
print("found shortlink stats:", shortlink_stats)

views = shortlink_stats["views"]
print('Views:', views)
per_hour, per_day, per_month = [], [], []
now = datetime.now()

day_aggregate = 0
month_aggregate = 0

for hour in range(24 * 360):
time_to_get = now - timedelta(hours=-hour)
time_to_hour = time_to_get.isoformat().split(":")[0]

day_aggregate = 0
month_aggregate = 0
ts = int(time_to_get.timestamp())

v = views.get(time_to_hour, 0)
Expand Down

0 comments on commit b1c1ab6

Please sign in to comment.