Skip to content

Commit

Permalink
Remove unnecessary if from ui text variables
Browse files Browse the repository at this point in the history
The _date and _time functions already check the nullity.
  • Loading branch information
jlaunonen committed Jul 20, 2024
1 parent 66807fd commit e4267f6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions kirppu/views/ui_text_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ def ui_text_vars(event) -> dict[str, typing.Any]:
"event.end.date": _date(event.end_date),
"event.homepage": event.home_page,
"registration.end.datetime": _datetime(event.registration_end),
"registration.end.date": _date(event.registration_end)
if event.registration_end
else "",
"registration.end.time": _time(event.registration_end)
if event.registration_end
else "",
"registration.end.date": _date(event.registration_end),
"registration.end.time": _time(event.registration_end),
}

0 comments on commit e4267f6

Please sign in to comment.