修复:获取我的数据列表错误

This commit is contained in:
ngfchl
2023-01-30 13:56:27 +08:00
parent cb1c7f97ae
commit afe48867a2

View File

@@ -695,7 +695,7 @@ def site_status_api(request):
'p_years': round(p_years, 4),
'now': datetime.strftime(
SiteStatus.objects.order_by('-updated_at').first().updated_at,
'%Y-%m-%d %H:%M:%S'),
'%Y-%m-%d %H:%M:%S') if len(SiteStatus.objects.all()) > 0 else datetime.now(),
}
# return render(request, 'auto_pt/status.html')
userdata = {