Use force_text for debug print to avoid showing non critical unicode errors in the console.

Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>
This commit is contained in:
Roberto Rosario
2017-03-06 23:09:15 -04:00
parent ae31800432
commit f11ffdec52

View File

@@ -11,7 +11,7 @@ from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import resolve, reverse from django.core.urlresolvers import resolve, reverse
from django.template import VariableDoesNotExist, Variable from django.template import VariableDoesNotExist, Variable
from django.template.defaulttags import URLNode from django.template.defaulttags import URLNode
from django.utils.encoding import smart_str, smart_unicode from django.utils.encoding import force_text, smart_str, smart_unicode
from django.utils.http import urlencode, urlquote from django.utils.http import urlencode, urlquote
from common.utils import return_attrib from common.utils import return_attrib
@@ -113,9 +113,8 @@ class Menu(object):
logger.debug( logger.debug(
'resolved_navigation_object_list: %s', 'resolved_navigation_object_list: %s',
resolved_navigation_object_list force_text(resolved_navigation_object_list)
) )
return resolved_navigation_object_list return resolved_navigation_object_list
def resolve(self, context, source=None): def resolve(self, context, source=None):