Added fix - you cannot concatenate lists with tuples and sets and it was possible that this would happen

This commit is contained in:
Leonel Câmara
2014-07-29 19:39:12 +01:00
parent 757fb934d5
commit 8d8095b1f5

View File

@@ -7421,7 +7421,7 @@ class Row(object):
def as_dict(self, datetime_to_str=False, custom_types=None):
SERIALIZABLE_TYPES = [str, unicode, int, long, float, bool, list, dict]
if isinstance(custom_types,(list,tuple,set)):
SERIALIZABLE_TYPES += custom_types
SERIALIZABLE_TYPES += list(custom_types)
elif custom_types:
SERIALIZABLE_TYPES.append(custom_types)
d = dict(self)