Cast values to string when writing to querystring

Mitigation for https://code.djangoproject.com/ticket/29627 in Django 2.1
This commit is contained in:
Matt Westcott 2018-08-03 16:15:17 +01:00 committed by Matt Westcott
parent b75e484717
commit 80a2389a26

View file

@ -281,7 +281,7 @@ def querystring(context, **kwargs):
querydict.pop(key, None)
else:
# Set the key otherwise
querydict[key] = value
querydict[key] = str(value)
return '?' + querydict.urlencode()