diff --git a/aurweb/util.py b/aurweb/util.py index 1f75ac22..cb8e4b5b 100644 --- a/aurweb/util.py +++ b/aurweb/util.py @@ -7,7 +7,7 @@ import string from datetime import datetime from distutils.util import strtobool as _strtobool from http import HTTPStatus -from typing import Callable, Iterable, Tuple +from typing import Callable, Iterable, Tuple, Union from urllib.parse import urlparse import fastapi @@ -133,9 +133,9 @@ def sanitize_params(offset: str, per_page: str) -> Tuple[int, int]: return (offset, per_page) -def strtobool(value: str) -> bool: +def strtobool(value: Union[str, bool]) -> bool: if isinstance(value, str): - return _strtobool(value) + return _strtobool(value or "False") return value diff --git a/templates/partials/account_form.html b/templates/partials/account_form.html index f6a24c66..9136ee7a 100644 --- a/templates/partials/account_form.html +++ b/templates/partials/account_form.html @@ -105,7 +105,11 @@ {% trans %}Hide Email Address{% endtrans %}: - +
{{ "If you do not hide your email address, it is "