From 8245aba24fabad084aeec03d1f2a6fdbcac35c3f Mon Sep 17 00:00:00 2001 From: Tony Osibov Date: Mon, 20 Oct 2014 16:05:11 -0500 Subject: [PATCH] fixed python 3 issue with str having __iter__ attribute --- parse_rest/datatypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parse_rest/datatypes.py b/parse_rest/datatypes.py index a6c1c8a..0bdc671 100644 --- a/parse_rest/datatypes.py +++ b/parse_rest/datatypes.py @@ -60,7 +60,7 @@ def convert_to_parse(python_object, as_pointer=False): ParseResource: Pointer } - if hasattr(python_object, '__iter__'): + if hasattr(python_object, '__iter__') and not isinstance(python_object, str): # It's an iterable? Repeat this whole process on each object return [ParseType.convert_to_parse(o, as_pointer=as_pointer) for o in python_object]