hotfix search (datetime naive date)
This commit is contained in:
@@ -4200,10 +4200,13 @@ def workouts_view(request,message='',successmessage='',
|
|||||||
# start date for the small graph
|
# start date for the small graph
|
||||||
activity_startdate = enddate-datetime.timedelta(days=15)
|
activity_startdate = enddate-datetime.timedelta(days=15)
|
||||||
|
|
||||||
if utc.localize(enddate) > timezone.now():
|
try:
|
||||||
activity_enddate = timezone.now()
|
if utc.localize(enddate) > timezone.now():
|
||||||
activity_startdate = activity_enddate-datetime.timedelta(days=15)
|
activity_enddate = timezone.now()
|
||||||
else:
|
activity_startdate = activity_enddate-datetime.timedelta(days=15)
|
||||||
|
else:
|
||||||
|
activity_enddate = enddate
|
||||||
|
except ValueError:
|
||||||
activity_enddate = enddate
|
activity_enddate = enddate
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user