dabo Commit
Revision 5241
Date: 2009-06-01 08:08:55 -0700 (Mon, 01 Jun 2009)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5241
Changed:
U trunk/dabo/db/dCursorMixin.py
Log:
Fixes problem with r5180 if there is no from clause in the
sql builder (UserSQL set directly, for example).
Diff:
Modified: trunk/dabo/db/dCursorMixin.py
===================================================================
--- trunk/dabo/db/dCursorMixin.py 2009-06-01 12:55:01 UTC (rev 5240)
+++ trunk/dabo/db/dCursorMixin.py 2009-06-01 15:08:55 UTC (rev 5241)
@@ -2153,6 +2153,9 @@
""" This method sets the appropriate filter for dependent child
queries."""
def getTableAlias(fromClause):
+ if not fromClause.strip():
+ return None
+
joinStrings = ["left join", "right join", "outer join",
"inner join", "join"]
foundAlias = None
for joinString in joinStrings:
@@ -2166,6 +2169,9 @@
return foundAlias
alias = getTableAlias(self.sqlManager._fromClause)
+ if not alias:
+ # Use the old way (pre 2180) of using the Table
(DataSource) property.
+ alias = self.Table
filtExpr = " %s.%s = %s " % (alias, fld, val)
self.setChildFilterClause(filtExpr)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]