mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
Merge pull request #1838 from bookwyrm-social/create-readthrough-bug
Fixes bug in verifying readthrough dates
This commit is contained in:
commit
d20db99501
1 changed files with 1 additions and 1 deletions
|
@ -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.")
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue