mirror of
https://github.com/ansible/awx.git
synced 2026-07-29 00:49:55 -02:30
Work around a bug in django 1.4 and 1.5 for qsstats that would not allow
it to work with USE_TZ = True
This commit is contained in:
@@ -122,6 +122,12 @@ class QuerySetStats(object):
|
||||
|
||||
stat_list = []
|
||||
dt = start
|
||||
try:
|
||||
from django.utils.timezone import utc
|
||||
dt = dt.replace(tzinfo=utc)
|
||||
end = end.replace(tzinfo=utc)
|
||||
except ImportError:
|
||||
pass
|
||||
while dt < end:
|
||||
idx = 0
|
||||
value = 0
|
||||
|
||||
Reference in New Issue
Block a user