kopia lustrzana https://github.com/wagtail/wagtail
Improve readability of urlparse path extraction
rodzic
f9bee8fb02
commit
9cf5e491ef
|
@ -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 ""
|
||||
|
|
Ładowanie…
Reference in New Issue