From 4129cb22a71bb51474b34d71f81afa97a0a139c2 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 3 Apr 2010 19:41:47 +0000 Subject: [PATCH] update regarding bug reported by Ole Rasmussen --- lib/core/agent.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index 19f4afe46..f4a6cd9f7 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -299,9 +299,12 @@ class Agent: fieldsToCastStr = fieldsSelect.groups()[0] elif fieldsNoSelect: fieldsToCastStr = fieldsNoSelect - - fieldsToCastList = fieldsToCastStr.replace(", ", ",") - fieldsToCastList = fieldsToCastList.split(",") + + if re.search("\A\w+\(.*\)", fieldsToCastStr, re.I): #function + fieldsToCastList = [fieldsToCastStr] + else: + fieldsToCastList = fieldsToCastStr.replace(", ", ",") + fieldsToCastList = fieldsToCastList.split(",") return fieldsSelectFrom, fieldsSelect, fieldsNoSelect, fieldsSelectTop, fieldsSelectCase, fieldsToCastList, fieldsToCastStr