On Tue, Dec 16, 2014 at 11:28:51AM -0500, Mike McLean wrote:
solves an oversight in the history query call
From 0ed03e80e38ab1c57b7d6f25d473088144a36f7a Mon Sep 17 00:00:00 2001 From: Mike McLean mikem@redhat.com Date: Tue, 16 Dec 2014 11:04:10 -0500 Subject: [PATCH] handle package field for group_package_listing in history queries
hub/kojihub.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/hub/kojihub.py b/hub/kojihub.py index f45bdf7..2eb9bef 100644 --- a/hub/kojihub.py +++ b/hub/kojihub.py @@ -5452,11 +5452,17 @@ def query_history(tables=None, **kwargs): data['build_id'] = get_build(value, strict=True)['id'] clauses.append("build.id = %(build_id)i") elif arg == 'package':
if 'package' not in joined:
pkg_field_name = "%s.package" % table
if 'package' in joined:
data['pkg_id'] = get_package_id(value, strict=True)
clauses.append("package.id = %(pkg_id)i")
elif pkg_field_name in fields:
# e.g. group_package_listing
data['group_package'] = str(value)
clauses.append("%s = %%(group_package)s" % pkg_field_name)
else: skip = True break
data['pkg_id'] = get_package_id(value, strict=True)
clauses.append("package.id = %(pkg_id)i") elif arg == 'user': if 'users' not in joined: skip = True
-- 1.9.3
+1
buildsys@lists.fedoraproject.org