Skip to content

Commit adb50a2

Browse files
kirsaniumphp-coder
kirsanium
authored andcommitted
fix(python): correctly handle type casts
1 parent 3b425e8 commit adb50a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/templates/routes.py.ejs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function generate_method_name(method, path) {
2424
// "INSERT INTO ... VALUES(:categoryId)" => "INSERT INTO ... VALUES(%(categoryId)s)"
2525
// See: https://www.psycopg.org/docs/usage.html#passing-parameters-to-sql-queries
2626
function convertToPsycopgNamedArguments(sql) {
27-
return sql.replace(/:([_a-zA-Z]+)/g, '%($1)s')
27+
return sql.replace(/(?<!:):([_a-zA-Z]+)/g, '%($1)s')
2828
}
2929
3030
// "/categories/:categoryId" => "/categories/{categoryId}"

0 commit comments

Comments
 (0)