From 31f33518545453a5002c56e03a6da8968eff2633 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Sun, 14 Nov 2021 10:22:26 -0800 Subject: [PATCH] Fixes bug comparing dates to nonetype --- bookwyrm/models/import_job.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bookwyrm/models/import_job.py b/bookwyrm/models/import_job.py index 387261f0..97b93b97 100644 --- a/bookwyrm/models/import_job.py +++ b/bookwyrm/models/import_job.py @@ -205,7 +205,9 @@ class ImportItem(models.Model): if start_date and start_date is not None and not self.date_read: return [ReadThrough(start_date=start_date)] if self.date_read: - start_date = start_date if start_date < self.date_read else None + start_date = ( + start_date if start_date and start_date < self.date_read else None + ) return [ ReadThrough( start_date=start_date,