Fixes bug comparing dates to nonetype

This commit is contained in:
Mouse Reeve 2021-11-14 10:22:26 -08:00
parent 8cede05d32
commit 31f3351854

View file

@ -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,