Skip to content

Commit 6bfa865

Browse files
committed
Fix #311
1 parent 64f35af commit 6bfa865

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/api/handlers/project.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def get(self, project_id):
198198
ORDER BY j.created_at DESC
199199
LIMIT 1
200200
)
201-
AND j.name LIKE %s
201+
AND j.name LIKE CONCAT(%s, '%')
202202
)
203203
''', [project_id, project_id, project_id, project_id, branch, job_name])
204204
elif build_number and build_restart_count:
@@ -222,12 +222,12 @@ def get(self, project_id):
222222
AND j.state in ('finished', 'unstable')
223223
AND b.project_id = %s
224224
AND j.project_id = %s
225-
AND j.name LIKE %s
225+
AND j.name LIKE CONCAT(%s, '%')
226226
AND b.build_number = %s
227227
AND b.restart_counter = %s
228228
LIMIT 1
229229
)
230-
AND j.name LIKE %s
230+
AND j.name LIKE CONCAT(%s, '%')
231231
)
232232
''', [project_id, project_id, project_id, project_id, job_name, build_number, build_restart_count, job_name])
233233
else:
@@ -251,11 +251,11 @@ def get(self, project_id):
251251
AND j.state in ('finished', 'unstable')
252252
AND b.project_id = %s
253253
AND j.project_id = %s
254-
AND j.name LIKE %s
254+
AND j.name LIKE CONCAT(%s, '%')
255255
ORDER BY j.end_date DESC
256256
LIMIT 1
257257
)
258-
AND j.name LIKE %s
258+
AND j.name LIKE CONCAT(%s, '%')
259259
)
260260
''', [project_id, project_id, project_id, project_id, job_name, job_name])
261261

0 commit comments

Comments
 (0)