summaryrefslogtreecommitdiff
path: root/django/utils/http.py
diff options
context:
space:
mode:
authorSimon Charette <charettes@users.noreply.github.com>2019-05-27 16:00:14 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2019-05-27 22:00:14 +0200
commitdf46b329e0900e9e4dc1d60816c1dce6dfc1094e (patch)
tree25ad840be25235baf160adf2ba44081008ae8116 /django/utils/http.py
parentb6c4766f53cf00bcf63cc2aa8be977c8589d083e (diff)
Refs #30485 -- Avoided unnecessary instance checks in urlencode.
Given doseq defaults to False it should avoid an unnecessary instance check in most cases.
Diffstat (limited to 'django/utils/http.py')
-rw-r--r--django/utils/http.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/http.py b/django/utils/http.py
index d77bfb5992..b6a78184a6 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)) or not doseq:
+ elif not doseq or isinstance(value, (str, bytes)):
query_val = value
else:
try: