Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jbi/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def issue_type(self) -> str:

def extract_from_see_also(self):
"""Extract Jira Issue Key from see_also if jira url present"""
if not self.see_also and len(self.see_also) > 0:
if not self.see_also or len(self.see_also) == 0:
return None

for url in self.see_also: # pylint: disable=not-an-iterable
Expand Down
4 changes: 2 additions & 2 deletions jbi/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ def execute_action(
The value returned by the action call is returned.
"""
log_context = RunnerLogContext(
bug=request.bug.dict(),
request=request.dict(),
bug=request.bug,
request=request,
operation=Operation.HANDLE,
)
try:
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_bugzilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def test_jira_labels(whiteboard, expected):
@pytest.mark.parametrize(
"see_also,expected",
[
(None, None),
([], None),
(["foo"], None),
(["fail:/format"], None),
Expand Down