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

RHINENG-11011: Fix null dereference errors #503

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rexwhite
Copy link
Collaborator

@rexwhite rexwhite commented Jul 1, 2024

Fixed the code to handle case where sequelize returns a null.

@@ -204,7 +204,7 @@ exports.list = errors.async(async function (req, res) {
req.user.username
);

playbook_runs = playbook_runs?.toJSON();
playbook_runs = playbook_runs?.toJSON() || {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there are no playbook runs, don't we want to return right away?

Copy link
Collaborator Author

@rexwhite rexwhite Jul 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well... sort of. This code is really bad about side effects so you have to be really careful, but we can at least break out of this 'P.map()' instance. I was in the process of changing that when I got pulled into a series of meetings but I'll push an update here shortly...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants