Improve readability of urlparse path extraction

pull/7839/head
Andy Babic 2022-01-21 11:57:33 +00:00 zatwierdzone przez Matt Westcott
rodzic f9bee8fb02
commit 9cf5e491ef
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -158,8 +158,7 @@ class Redirect(models.Model):
return ""
# Extract the path from the rest of the value
url_parsed = urlparse(url)
path = url_parsed[2]
path = urlparse(url).path
if path == "/":
return ""