From a57097d5043bf8c02377a518faebbb80b8135ade Mon Sep 17 00:00:00 2001 From: George Lacey Date: Tue, 11 Oct 2022 06:55:11 +0100 Subject: [PATCH] Set default for archives that don't exist --- borgweb/borg/models/repo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/borgweb/borg/models/repo.py b/borgweb/borg/models/repo.py index 08647e0..7f43156 100644 --- a/borgweb/borg/models/repo.py +++ b/borgweb/borg/models/repo.py @@ -102,7 +102,7 @@ class Repo(models.Model): @staticmethod def series_csize(archives, units=None): return [convert_bytes(archive.cache.unique_csize, units)[0] - if archive is not None else None for archive in archives] + if archive is not None else 0 for archive in archives] def hourly_archive_string(self): return ''.join(['H' if archive is not None else '-' for archive in self.hourly_archives(8)])