Patch for an Issue #1018

This commit is contained in:
Miroslav Stampar 2014-12-12 14:54:47 +01:00
parent 23d33bb5b5
commit 650dfe9526

View File

@ -281,7 +281,7 @@ def errorUse(expression, dump=False):
# Count the number of SQL query entries output # Count the number of SQL query entries output
countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % ('*' if len(expressionFieldsList) > 1 else expressionFields), 1) countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % ('*' if len(expressionFieldsList) > 1 else expressionFields), 1)
if " ORDER BY " in expression.upper(): if " ORDER BY " in countedExpression.upper():
_ = countedExpression.upper().rindex(" ORDER BY ") _ = countedExpression.upper().rindex(" ORDER BY ")
countedExpression = countedExpression[:_] countedExpression = countedExpression[:_]