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

ui: Bugfix salt redux store #3477

Merged
merged 2 commits into from
Aug 5, 2021
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 ui/src/ducks/app/salt.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export function* manageLocalStorage() {

export function* refreshJobStatus(job) {
const result = yield call(ApiSalt.printJob, job.jid);
const intl = yield call(intlSelector);
const intl = yield select(intlSelector);
if (result.error) {
yield put(
addNotificationErrorAction({
Expand Down
5 changes: 4 additions & 1 deletion ui/src/services/salt/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ export function getJobStatusFromPrintJob(result, jid) {
// add error handling when indicating the error inside the JSON
if (job && job['Error']) {
status.completed = true;
const returner = Object.values(job['Result'])[0].return;
const returner = Object.values(job['Result'])?.[0]?.return;
if (!returner) {
return { ...status};
}
status = { ...status, ...parseJobError(returner) };
}

Expand Down