Skip to content

Commit aa8aafe

Browse files
committed
bugzilla: move the last rhbz specific query bits to Bugzilla
So we can break the pattern of adding custom bits in subclasses. We shouldn't add site specific extensions to the API anymore, but we let's keep these old values around for compat at least
1 parent d4d288c commit aa8aafe

2 files changed

Lines changed: 7 additions & 10 deletions

File tree

bugzilla/base.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1036,7 +1036,8 @@ def build_query(self,
10361036
savedsearch_sharer_id=None,
10371037
sub_component=None,
10381038
tags=None,
1039-
exclude_fields=None):
1039+
exclude_fields=None,
1040+
extra_fields=None):
10401041
"""
10411042
Build a query string from passed arguments. Will handle
10421043
query parameter differences between various bugzilla versions.
@@ -1116,13 +1117,16 @@ def add_email(key, value, count):
11161117
query["longdesc_type"] = "allwordssubstr"
11171118

11181119
# 'include_fields' only available for Bugzilla4+
1120+
# 'extra_fields' is an RHBZ extension
11191121
query.update(self._process_include_fields(
1120-
include_fields, exclude_fields, None))
1122+
include_fields, exclude_fields, extra_fields))
11211123

11221124
# Strip out None elements in the dict
11231125
for k, v in query.copy().items():
11241126
if v is None:
11251127
del(query[k])
1128+
1129+
self.pre_translation(query)
11261130
return query
11271131

11281132
def query(self, query):

bugzilla/rhbugzilla.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -339,11 +339,4 @@ def _warn_bool(kwkey):
339339
_warn_bool("devel_whiteboard")
340340
_warn_bool("alias")
341341

342-
query = {}
343-
query.update(self._process_include_fields(None, None,
344-
kwargs.pop('extra_fields', None)))
345-
346-
newquery = Bugzilla.build_query(self, **kwargs)
347-
query.update(newquery)
348-
self.pre_translation(query)
349-
return query
342+
return Bugzilla.build_query(self, **kwargs)

0 commit comments

Comments
 (0)