Skip to content

Commit ddbc69d

Browse files
committed
detecting sqlparse.tokens.Literal.String too
1 parent 70a7f77 commit ddbc69d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cs50/sql.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ def execute(self, sql, *args, **kwargs):
218218

219219
# In string literal
220220
# https://www.sqlite.org/lang_keywords.html
221-
if token.ttype == sqlparse.tokens.Literal.String.Single:
221+
if token.ttype in [sqlparse.tokens.Literal.String, sqlparse.tokens.Literal.String.Single]:
222222
token.value = re.sub("(^'|\s+):", "\\1\\:", token.value)
223223

224224
# In identifier

0 commit comments

Comments
 (0)