Selaa lähdekoodia

fix: add decode ignore

master
xuxiaofei 4 vuotta sitten
vanhempi
commit
beb31523fc
  1. 6
      vislib/views/views.py

6
vislib/views/views.py

@ -50,7 +50,7 @@ def execSql(request):
column = key
if isinstance(row[key], bytes):
print(row[key], key)
json_data[index][column] = row[key].decode('UTF-8')
json_data[index][column] = row[key].decode('UTF-8', 'ignore')
else:
json_data[index][column] = row[key]
response = {
@ -62,7 +62,7 @@ def execSql(request):
print(e)
response = {
'code': 10000,
'message': 'fail',
'data': str(e)
'message': str(e),
'data': {}
}
return JsonResponse(response)

Ladataan…
Peruuta
Tallenna