Fix job fetching for never ran jobs

This commit is contained in:
TheophileDiot 2022-11-29 11:45:13 +01:00
parent 0954e82f48
commit 547021e7b0
1 changed files with 6 additions and 2 deletions

View File

@ -1224,14 +1224,18 @@ class Database:
"every": job.every,
"reload": job.reload,
"success": job.success,
"last_run": job.last_run.strftime("%Y/%m/%d, %I:%M:%S %p"),
"last_run": job.last_run.strftime("%Y/%m/%d, %I:%M:%S %p")
if job.last_run is not None
else "Never",
"cache": [
{
"service_id": cache.service_id,
"file_name": cache.file_name,
"last_update": cache.last_update.strftime(
"%Y/%m/%d, %I:%M:%S %p"
),
)
if cache.last_update is not None
else "Never",
}
for cache in session.query(Jobs_cache)
.with_entities(