From efcf8c0c9550b2f79b6301170d3892284bd271ef Mon Sep 17 00:00:00 2001 From: mdipierro Date: Fri, 3 Jan 2014 22:00:02 -0600 Subject: [PATCH] fixed problem about excutesql(as_dict=True) and ambiguous column names, thanks Anthony --- VERSION | 2 +- gluon/dal.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 1d68e3e2..5c529d15 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.8.2-stable+timestamp.2014.01.03.21.30.13 +Version 2.8.2-stable+timestamp.2014.01.03.21.59.04 diff --git a/gluon/dal.py b/gluon/dal.py index 8e56b0c2..2013155b 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -8453,6 +8453,9 @@ def index(): columns = adapter.cursor.description # reduce the column info down to just the field names fields = colnames or [f[0] for f in columns] + if len(fields) != len(set(fields)): + raise RuntimeError( + "as_dict=True not supported if ambiguous column names") # will hold our finished resultset in a list data = adapter._fetchall() # convert the list for each row into a dictionary so it's