Skip to content

Commit

Permalink
[cuegui] Fix issue on opening job comments (#1532)
Browse files Browse the repository at this point in the history
CommentListDialog expects a list of jobs and at some point the input got
changed to the first job on the list.

Opening the comments dialog on the current version returns:
```
TypeError: 'Job' object is not iterable 
```
  • Loading branch information
DiegoTavares authored Oct 8, 2024
1 parent e343152 commit 6f7702e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cuegui/cuegui/MenuActions.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ def dropInternalDependencies(self, rpcObjects=None):
def viewComments(self, rpcObjects=None):
jobs = self._getOnlyJobObjects(rpcObjects)
if jobs:
cuegui.Comments.CommentListDialog(jobs[0], self._caller).show()
cuegui.Comments.CommentListDialog(jobs, self._caller).show()

dependWizard_info = ["Dependency &Wizard...", None, "configure"]

Expand Down
2 changes: 1 addition & 1 deletion cuegui/tests/MenuActions_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def test_viewComments(self, commentListMock):

self.job_actions.viewComments(rpcObjects=[job])

commentListMock.assert_called_with(job, self.widgetMock)
commentListMock.assert_called_with([job], self.widgetMock)
commentListMock.return_value.show.assert_called()

@mock.patch('cuegui.DependWizard.DependWizard')
Expand Down

0 comments on commit 6f7702e

Please sign in to comment.