Skip to content

Commit

Permalink
#312 Solves String encoding causing column labels to be prefixed with…
Browse files Browse the repository at this point in the history
… 'b' in Python 3x
  • Loading branch information
dpgaspar committed May 13, 2016
1 parent f57cb4f commit 2b37795
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flask_appbuilder/baseviews.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import logging
from flask import Blueprint, session, flash, render_template, url_for, abort
from ._compat import as_unicode
from .forms import GeneralModelConverter
from .widgets import FormWidget, ShowWidget, ListWidget, SearchWidget
from .actions import ActionItem
Expand Down Expand Up @@ -447,7 +448,7 @@ def _label_columns_json(self):
"""
ret = {}
for key, value in list(self.label_columns.items()):
ret[key] = str(value.encode('UTF-8'))
ret[key] = as_unicode(value.encode('UTF-8'))
return ret


Expand Down

0 comments on commit 2b37795

Please sign in to comment.