From f5de0dd3c9b55ce0dca7bacb9df6dfec4dd8233a Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 17 Jan 2022 19:46:48 -0800 Subject: [PATCH] Fixes bug in verifying readthrough dates --- bookwyrm/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/forms.py b/bookwyrm/forms.py index 5ab908955..ef9bbc159 100644 --- a/bookwyrm/forms.py +++ b/bookwyrm/forms.py @@ -500,7 +500,7 @@ class ReadThroughForm(CustomForm): cleaned_data = super().clean() start_date = cleaned_data.get("start_date") finish_date = cleaned_data.get("finish_date") - if start_date > finish_date: + if start_date and finish_date and start_date > finish_date: self.add_error( "finish_date", _("Reading finish date cannot be before start date.") )