Fix unicode type judgment
This patch changes judgment for "unicode" type to "six.text_type". Change-Id: I55869266338e61c10118d327ca51c463c0fa6ad4
This commit is contained in:
parent
530ba016ad
commit
18f4af1a23
@ -15,6 +15,7 @@
|
||||
|
||||
from __future__ import absolute_import
|
||||
import logging
|
||||
import six
|
||||
|
||||
from django.conf import settings
|
||||
|
||||
@ -50,7 +51,7 @@ def _cleanup_params(attrs, create, **params):
|
||||
raise exceptions.BadRequest(
|
||||
"Key must be in %s" % ",".join(attrs))
|
||||
if key == "labels":
|
||||
if isinstance(value, str) or isinstance(value, unicode):
|
||||
if isinstance(value, str) or isinstance(value, six.text_type):
|
||||
labels = {}
|
||||
vals = value.split(",")
|
||||
for v in vals:
|
||||
|
Loading…
Reference in New Issue
Block a user