summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAlexander Gaevsky <sasha@sasha0.ru>2016-01-07 11:07:15 +0200
committerTim Graham <timograham@gmail.com>2016-01-08 12:28:32 -0500
commitade54ffa34ddc6c19b26c6ea72b46f73af7b682b (patch)
treebeba0456c0075bf7ad4e0d9f2a30a813b6014272 /django
parent822a03b3e41c7c26b7b623c782fbcf9e6eea863f (diff)
Refs #25165 -- Fixed JSON serialization for add/edit popup in the admin.
Forwardport of test in o839d71d8562abe0b245024e55ca1d02a45e58fd from stable/1.9.x (refs #25997).
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/options.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index 8b0af2b78d..a09c958282 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -1135,9 +1135,9 @@ class ModelAdmin(BaseModelAdmin):
new_value = obj.serializable_value(attr)
popup_response_data = json.dumps({
'action': 'change',
- 'value': value,
+ 'value': six.text_type(value),
'obj': six.text_type(obj),
- 'new_value': new_value,
+ 'new_value': six.text_type(new_value),
})
return SimpleTemplateResponse('admin/popup_response.html', {
'popup_response_data': popup_response_data,