From 001f754cd36f401fd47cd17d53515524db730519 Mon Sep 17 00:00:00 2001 From: Clinton Hall Date: Sun, 8 Mar 2020 13:36:26 +1300 Subject: [PATCH] Fix unicode check in Py2 #1725 (#1727) --- core/forks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/forks.py b/core/forks.py index c1cbb91c..021631ee 100644 --- a/core/forks.py +++ b/core/forks.py @@ -28,7 +28,11 @@ def api_check(r, params, rem_params): logger.debug('Response received: {}'.format(json_data)) raise else: - if isinstance(json_data, str): + if six.PY3: + str_type = (str) + else: + str_type = (str, unicode) + if isinstance(json_data, str_type): return rem_params, False json_data = json_data.get('data', json_data)