mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 19:41:11 +00:00
re-format code
This commit is contained in:
parent
b895fbd8f2
commit
4ab5e4b5d9
1 changed files with 8 additions and 2 deletions
|
@ -59,11 +59,17 @@ class ReadThroughForm(CustomForm):
|
|||
"stopped_date", _("Reading stopped date cannot be before start date.")
|
||||
)
|
||||
current_time = datetime.datetime.now()
|
||||
if stopped_date is not None and current_time.timestamp() < stopped_date.timestamp():
|
||||
if (
|
||||
stopped_date is not None
|
||||
and current_time.timestamp() < stopped_date.timestamp()
|
||||
):
|
||||
self.add_error(
|
||||
"stopped_date", _("Reading stopped date cannot be in the future.")
|
||||
)
|
||||
if finish_date is not None and current_time.timestamp() < finish_date.timestamp():
|
||||
if (
|
||||
finish_date is not None
|
||||
and current_time.timestamp() < finish_date.timestamp()
|
||||
):
|
||||
self.add_error(
|
||||
"finish_date", _("Reading finished date cannot be in the future.")
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue