Skip to content

Commit

Permalink
find all sessions in range, including last day
Browse files Browse the repository at this point in the history
  • Loading branch information
brad committed May 9, 2016
1 parent f7f9169 commit 290fba6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion misfitapp/models.py
Expand Up @@ -300,7 +300,9 @@ def import_all_from_misfit(cls, misfit, uid,
end_date=datetime.date.today()):
# Keep track of the data we already have
exists = cls.objects.filter(
user_id=uid, start_time__gte=start_date, start_time__lte=end_date
user_id=uid,
start_time__gte=start_date,
start_time__lt=end_date + datetime.timedelta(days=1)
).values_list('id', flat=True)
obj_list = []
date_chunks = chunkify_dates(start_date, end_date, 30)
Expand Down

0 comments on commit 290fba6

Please sign in to comment.