mirror of
https://github.com/ansible/awx.git
synced 2026-01-24 16:01:20 -03:30
fix running analytics for the first time
This commit is contained in:
parent
88f70253a5
commit
afe4279e5f
@ -381,7 +381,7 @@ def gather_analytics():
|
||||
from rest_framework.fields import DateTimeField
|
||||
|
||||
last_gather = Setting.objects.filter(key='AUTOMATION_ANALYTICS_LAST_GATHER').first()
|
||||
last_time = DateTimeField().to_internal_value(last_gather.value) if last_gather else None
|
||||
last_time = DateTimeField().to_internal_value(last_gather.value) if last_gather and last_gather.value else None
|
||||
gather_time = now()
|
||||
|
||||
if not last_time or ((gather_time - last_time).total_seconds() > settings.AUTOMATION_ANALYTICS_GATHER_INTERVAL):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user