Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cuegui] Fix TypeError in Comment viewer: Handle job object as iterable #1542

Conversation

ramonfigueiredo
Copy link
Collaborator

  • Updated viewComments method in MenuActions.py to wrap single Job objects in a list.
  • This prevents TypeError when attempting to iterate over a non-iterable Job object.

…iterable

- Updated `viewComments` method in MenuActions.py to wrap single Job objects in a list.
- This prevents TypeError when attempting to iterate over a non-iterable Job object.
@ramonfigueiredo
Copy link
Collaborator Author

This code fixes the error due to an issue where the code expects the jobs object to be iterable, but a single Job object is being passed, resulting in a TypeError. The fix ensures that when a single Job object is passed, it is wrapped in a list to make it iterable.

@ramonfigueiredo ramonfigueiredo marked this pull request as ready for review October 17, 2024 00:10
@ramonfigueiredo ramonfigueiredo merged commit 5ab915b into AcademySoftwareFoundation:master Oct 17, 2024
12 checks passed
DiegoTavares pushed a commit to DiegoTavares/OpenCue that referenced this pull request Oct 28, 2024
…le (AcademySoftwareFoundation#1542)

- Updated `viewComments` method in `MenuActions.py` to wrap single Job
objects in a list.
- This prevents `TypeError` when attempting to iterate over a
non-iterable Job object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants