Skip to content

Commit

Permalink
Self PR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffshek committed Sep 15, 2020
1 parent 0476680 commit 5833cf6
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions open/core/betterself/views/overview_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,6 @@ def get(self, request, start_date, end_date):
start_period = serialize_date_to_user_localized_datetime(start_date, user)
end_period = serialize_end_date_to_user_localized_datetime(end_date, user)

# if period == "daily":
# end_period = start_period
# elif period == "weekly":
# end_period = get_time_relative_units_forward(start_period, weeks=1)
# elif period == "monthly":
# end_period = get_time_relative_units_forward(start_period, months=1)
# elif period == "yearly":
# end_period = get_time_relative_units_forward(start_period, years=1)
# else:
# raise ValueError(f"Invalid Period {period}")

# set the end to a datetime at 11:59 PM
# end_period = datetime(
# year=end_period.year,
# month=end_period.month,
# day=end_period.day,
# hour=23,
# minute=59,
# second=59,
# tzinfo=user.timezone,
# )

sleep_data = get_overview_sleep_data(
user, start_period=start_period, end_period=end_period
)
Expand All @@ -52,7 +30,6 @@ def get(self, request, start_date, end_date):
)

response = {
# "period": period,
# change it back to date, so it doesn't look super confusing on api response ...
"start_period": start_period.date().isoformat(),
"end_period": end_period.date().isoformat(),
Expand Down

0 comments on commit 5833cf6

Please sign in to comment.