mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 20:30:46 -03:30
Merge pull request #9993 from chrismeyersfsu/fix-gather_analytics_first_time_run
fix running analytics for the first time related to #9992 Reviewed-by: Jeff Bradberry <None>
This commit is contained in:
commit
9fd2c5ba16
@ -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