From 48d6df855cb33fe77c3eb7927541f932793b0635 Mon Sep 17 00:00:00 2001 From: Tomas Kopecek Date: Jun 03 2021 13:18:36 +0000 Subject: hub: fix SQL condition Fixes: https://pagure.io/koji/issue/2897 --- diff --git a/hub/kojihub.py b/hub/kojihub.py index 3233e6e..e4074d8 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -1363,8 +1363,7 @@ def readTaggedBuilds(tag, event=None, inherit=False, latest=False, package=None, if not btype: raise koji.GenericError('unsupported build type: %s' % type) btype_id = btype['id'] - joins += ['build_types ON build.id = build_types.build_id', - 'btype_id = %(btype_id)s'] + joins += ['build_types ON build.id = build_types.build_id AND btype_id = %(btype_id)s'] clauses = [ eventCondition(event, 'tag_listing'),