diff options
Diffstat (limited to 'mirrors/models.py')
-rw-r--r-- | mirrors/models.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mirrors/models.py b/mirrors/models.py index d2c64c51..57664562 100644 --- a/mirrors/models.py +++ b/mirrors/models.py @@ -161,6 +161,8 @@ class MirrorLog(models.Model): error = models.TextField(blank=True, default='') def delay(self): + if self.last_sync is None: + return None # sanity check, this shouldn't happen if self.check_time < self.last_sync: return timedelta() |