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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy