diff options
| author | Johan Lübcke <johan@lubcke.se> | 2019-05-24 17:15:34 +0200 |
|---|---|---|
| committer | Carlton Gibson <carlton.gibson@noumenal.es> | 2019-05-24 17:15:34 +0200 |
| commit | 0670b1b403087ec2d311321597b387ad541ea2e0 (patch) | |
| tree | 6bf7f6ec259900e7fe349ccbb09739568a4b4d3d /django/utils/http.py | |
| parent | 1d25354fb5f87d35968cd78b53d9560fd75f5b1a (diff) | |
Fixed #30485 -- Adjusted django.utils.http.urlencode for doseq=False case.
Diffstat (limited to 'django/utils/http.py')
| -rw-r--r-- | django/utils/http.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/http.py b/django/utils/http.py index 3def0e02a6..d77bfb5992 100644 --- a/django/utils/http.py +++ b/django/utils/http.py @@ -116,7 +116,7 @@ def urlencode(query, doseq=False): 'Cannot encode None in a query string. Did you mean to pass ' 'an empty string or omit the value?' ) - elif isinstance(value, (str, bytes)): + elif isinstance(value, (str, bytes)) or not doseq: query_val = value else: try: @@ -124,7 +124,7 @@ def urlencode(query, doseq=False): except TypeError: query_val = value else: - # Consume generators and iterators, even when doseq=True, to + # Consume generators and iterators, when doseq=True, to # work around https://bugs.python.org/issue31706. query_val = [] for item in itr: |
