Simplify conditional

This commit is contained in:
Carlos Quintana 2022-02-15 16:33:30 +01:00
parent 2f9489fe39
commit 39222cf868
No known key found for this signature in database
GPG Key ID: 9A3A2DE1C3E2A4B1
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ def sanitize_email(email_address: str, not_lower=False) -> str:
def sanitize_next_url(url: Optional[str]) -> Optional[str]:
if url is None or len(url) == 0:
if not url:
return None
if url[0] != "/":
return None