Fixes bug comparing dates to nonetype
This commit is contained in:
parent
8cede05d32
commit
31f3351854
|
@ -205,7 +205,9 @@ class ImportItem(models.Model):
|
||||||
if start_date and start_date is not None and not self.date_read:
|
if start_date and start_date is not None and not self.date_read:
|
||||||
return [ReadThrough(start_date=start_date)]
|
return [ReadThrough(start_date=start_date)]
|
||||||
if self.date_read:
|
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 [
|
return [
|
||||||
ReadThrough(
|
ReadThrough(
|
||||||
start_date=start_date,
|
start_date=start_date,
|
||||||
|
|
Loading…
Reference in New Issue