diff --git a/bookwyrm/utils/validate.py b/bookwyrm/utils/validate.py index a6272319b..89aee4782 100644 --- a/bookwyrm/utils/validate.py +++ b/bookwyrm/utils/validate.py @@ -4,7 +4,10 @@ from bookwyrm.settings import DOMAIN, USE_HTTPS def validate_url_domain(url, default="/"): """Basic check that the URL starts with the instance domain name""" - if url in ("/", default, None): + if not url: + return default + + if url in ("/", default): return url protocol = "https://" if USE_HTTPS else "http://"