mirror of
https://github.com/django/django.git
synced 2025-10-30 00:56:09 +00:00
Fixed #22114 -- Stopped adding trailing slashes in URLField.to_python
Thanks coredumperror at gmail.com for the report and Tim Graham for the review.
This commit is contained in:
@@ -704,9 +704,6 @@ class URLField(CharField):
|
||||
# Rebuild the url_fields list, since the domain segment may now
|
||||
# contain the path too.
|
||||
url_fields = split_url(urlunsplit(url_fields))
|
||||
if not url_fields[2]:
|
||||
# the path portion may need to be added before query params
|
||||
url_fields[2] = '/'
|
||||
value = urlunsplit(url_fields)
|
||||
return value
|
||||
|
||||
|
||||
Reference in New Issue
Block a user