Skip to content

Commit

Permalink
Add batch_id param support for create errata function
Browse files Browse the repository at this point in the history
  • Loading branch information
Ximinhan committed Jun 21, 2024
1 parent 25489e0 commit a4cfa20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions errata_tool/erratum.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ def update(self, **kwargs):
if 'solution' in kwargs:
self.solution = self.fmt(kwargs['solution'])
self._update = True
if 'batch_id' in kwargs:
self.batch_id = kwargs['batch_id']
self._update = True


def __init__(self, **kwargs):

Expand Down Expand Up @@ -840,6 +844,8 @@ def _write(self):
pdata['advisory[assigned_to_email]'] = self.qe_email
if self.qe_group is not None and self.qe_group != '':
pdata['advisory[quality_responsibility_name]'] = self.qe_group
if self.batch_id is not None:
pdata['batch[id]'] = self.batch_id

if self.synopsis is None:
raise ErrataException("Can't write erratum without synopsis")
Expand Down
2 changes: 1 addition & 1 deletion errata_tool/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _fixture(self):
"""Return path to our static fixture file. """
fdir = os.path.join(FIXTURES_DIR, 'errata.devel.redhat.com/')
filename = self._url_with_params.replace(
'https://errata.devel.redhat.com/', fdir)
'https://errata.devel.redhat.com/', fdir).replace('https://errata.stage.engineering.redhat.com/', fdir)
# If we need to represent this API endpoint as both a directory and a
# file, check for a ".body" file.
if os.path.isdir(filename):
Expand Down

0 comments on commit a4cfa20

Please sign in to comment.