Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad8455c

Browse files
committed
Merge pull request lionheart#81 from gmc-dev/master
fixes lionheart#79
2 parents 14b4038 + 5b7ed3c commit ad8455c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

django_pyodbc/compiler.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,9 @@ def _alias_columns(self, sql):
338338
buf = paren_buf.pop()
339339

340340
# store the expanded paren string
341+
buf = re.sub(r'%([^\(])', r'$$$\1', buf)
341342
parens[key] = buf% parens
343+
parens[key] = re.sub(r'\$\$\$([^\(])', r'%\1', parens[key])
342344
#cannot use {} because IBM's DB2 uses {} as quotes
343345
paren_buf[paren_depth] += '(%(' + key + ')s)'
344346
else:

0 commit comments

Comments
 (0)