From 04098ff27631e9273d81cc18cc571781f7029d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Denis=20Rivi=C3=A8re?= Date: Tue, 5 May 2020 11:50:55 +0200 Subject: [PATCH] use six.string_types for tests (fix for python2) --- python/populse_db/database.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/populse_db/database.py b/python/populse_db/database.py index 961c39f..cfa5d42 100644 --- a/python/populse_db/database.py +++ b/python/populse_db/database.py @@ -1630,7 +1630,8 @@ def __check_type_value(value, valid_type): return True if valid_type == FIELD_TYPE_BOOLEAN and value_type == bool: return True - if valid_type == FIELD_TYPE_STRING and isinstance(value, str): + if valid_type == FIELD_TYPE_STRING and isinstance(value, + six.string_types): return True if valid_type == FIELD_TYPE_JSON and isinstance(value, dict): return True