Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9ff872a

Browse files
committed
The quote function should return a string suitable for dropping into a
query string. This fixes a bug where bool types sometimes returned with a string that could not be dropped into a query.
1 parent 8466680 commit 9ff872a

File tree

1 file changed

+1
-1
lines changed
  • src/interfaces/python

1 file changed

+1
-1
lines changed

src/interfaces/python/pg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def _quote(d, t):
2929

3030
if t == 'bool':
3131
# Can't run upper() on these
32-
if d in (0, 1): return ('f', 't')[d]
32+
if d in (0, 1): return ("'f'", "'t'")[d]
3333

3434
if string.upper(d) in ['T', 'TRUE', 'Y', 'YES', '1', 'ON']:
3535
return "'t'"

0 commit comments

Comments
 (0)