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
|
||||
activity_startdate = enddate-datetime.timedelta(days=15)
|
||||
|
||||
if utc.localize(enddate) > timezone.now():
|
||||
activity_enddate = timezone.now()
|
||||
activity_startdate = activity_enddate-datetime.timedelta(days=15)
|
||||
else:
|
||||
try:
|
||||
if utc.localize(enddate) > timezone.now():
|
||||
activity_enddate = timezone.now()
|
||||
activity_startdate = activity_enddate-datetime.timedelta(days=15)
|
||||
else:
|
||||
activity_enddate = enddate
|
||||
except ValueError:
|
||||
activity_enddate = enddate
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user