]> err.no Git - dak/commitdiff
don't be too lax with our LIKE match
authorMark Hymers <mhy@debian.org>
Sun, 8 Nov 2009 11:57:01 +0000 (11:57 +0000)
committerMark Hymers <mhy@debian.org>
Sun, 8 Nov 2009 11:57:01 +0000 (11:57 +0000)
Signed-off-by: Mark Hymers <mhy@debian.org>
daklib/dbconn.py

index 84d5b1c2c059fd586793bdbe54d1b0f0468a95d6..e1b2425079e6a87cf6f027ced44ef523921cb768 100644 (file)
@@ -1152,7 +1152,7 @@ def get_poolfile_like_name(filename, session=None):
     """
 
     # TODO: There must be a way of properly using bind parameters with %FOO%
-    q = session.query(PoolFile).filter(PoolFile.filename.like('%%%s%%' % filename))
+    q = session.query(PoolFile).filter(PoolFile.filename.like('%%/%s' % filename))
 
     return q.all()