Skip to content
Snippets Groups Projects
Commit a2266de9 authored by Tom Teichler's avatar Tom Teichler :beers: Committed by Jonathan Weth
Browse files

Fix backup calculation

(cherry picked from commit a4538635)
parent ee2415ba
No related branches found
No related tags found
1 merge request!669Do release 2.0b2
......@@ -38,9 +38,9 @@ class BaseBackupHealthCheck(BaseHealthCheckBackend):
self.add_error(_("The backup folder doesn't exist."))
return
if backups:
last_backup = backups[-1]
last_backup_time = dbbackup_utils.filename_to_date(last_backup)
time_gone_since_backup = last_backup_time - datetime.now()
last_backup = backups[:1]
last_backup_time = dbbackup_utils.filename_to_date(last_backup[0])
time_gone_since_backup = datetime.now() - last_backup_time
# Check if backup is older than configured time
if time_gone_since_backup.seconds > self.configured_seconds:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment