fix annotation import, values are decoded in d1.9

This commit is contained in:
j 2016-03-05 15:36:39 +05:30
parent a8dcbbbe89
commit 4f28c2c548
2 changed files with 3 additions and 4 deletions

View file

@ -1,6 +1,5 @@
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
import json
import ox
from django.conf import settings
@ -33,7 +32,7 @@ def update_matches(id, type):
names = {}
for n in Model.objects.all().values('id', 'name', 'alternativeNames'):
names[n['id']] = [ox.decode_html(x)
for x in [n['name']] + json.loads(n['alternativeNames'])]
for x in (n['name'],) + n['alternativeNames']]
value = a.findvalue.lower()
current = [p.id for p in a_matches.all()]

View file

@ -368,7 +368,7 @@ def getTaskStatus(request, data):
if status in default_backend.EXCEPTION_STATES:
traceback = default_backend.get_traceback(task_id)
response['data'].update({
'result': str(res.args[0]),
'result': str(res),
'exc': get_full_cls_name(res.__class__),
'traceback': traceback
})