summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTarvi Pillessaar2012-05-23 13:09:45 +0000
committerTarvi Pillessaar2012-05-23 13:09:45 +0000
commit59352a116ed531e347394a62857db06483160d7a (patch)
tree34ccf3872e177d93b26f09b86feb5a1eb2831407
parentcece3d7e465265be77257cd462bc818be0a161a0 (diff)
dbservice.get_record_list: do not use parse_pgarray on python lists
-rwxr-xr-xpython/skytools/dbservice.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/skytools/dbservice.py b/python/skytools/dbservice.py
index e49576ce..d1ddb666 100755
--- a/python/skytools/dbservice.py
+++ b/python/skytools/dbservice.py
@@ -92,7 +92,11 @@ def get_record_list(array):
"""
if array is None:
return []
- return map(get_record, skytools.parse_pgarray(array))
+
+ if isinstance(array, list):
+ return map(get_record, array)
+ else:
+ return map(get_record, skytools.parse_pgarray(array))
def get_record_lists(tbl, field):
""" Create dictionary of lists from given list using field as grouping criteria