]> err.no Git - dak/commitdiff
daklib/archive.py (install_binary): fix use of source_suites
authorAnsgar Burchardt <ansgar@debian.org>
Sun, 8 Jul 2012 19:23:25 +0000 (13:23 -0600)
committerAnsgar Burchardt <ansgar@debian.org>
Fri, 13 Jul 2012 16:43:17 +0000 (10:43 -0600)
daklib/archive.py

index edb9991404e2787c73a1b086fa630950c2643a0a..2ee4d89b04cd970576f2dbcd6f7e6a9d5c0bf939 100644 (file)
@@ -136,7 +136,8 @@ class ArchiveTransaction(object):
         source = source_query.filter(DBSource.suites.contains(suite)).first()
         if source is None:
             if source_suites != True:
-                source_query = source_query.filter(DBSource.suites.any(source_suites))
+                source_query = source_query.join(DBSource.suites) \
+                    .filter(Suite.suite_id == source_suites.c.id)
             source = source_query.first()
             if source is None:
                 raise ArchiveException('{0}: trying to install to {1}, but could not find source'.format(binary.hashed_file.filename, suite.suite_name))