Skip to content

Commit

Permalink
Merge pull request #961 from Jappzy/fix-save-workflow-params
Browse files Browse the repository at this point in the history
fix: Save workflow error when updating with parameters
  • Loading branch information
amanda11 authored Mar 14, 2022
2 parents bf005ce + 9131fdf commit 45960c3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
1 change: 0 additions & 1 deletion apps/st2-actions/actions-panel.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ export default class ActionsPanel extends React.Component {
</PanelView>

<ActionsDetails
ref={(ref) => this._details = ref}
handleNavigate={(...args) => this.navigate(...args)}
handleRun={(...args) => this.handleRun(...args)}
handleDelete={(...arg) => this.handleDelete(...arg)}
Expand Down
1 change: 0 additions & 1 deletion apps/st2-history/history-panel.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ export default class HistoryPanel extends React.Component {
</PanelView>

<HistoryDetails
ref={(ref) => this._details = ref}
handleNavigate={(...args) => this.navigate(...args)}
handleRerun={(...args) => this.handleRerun(...args)}
handleCancel={(...args) => this.handleCancel(...args)}
Expand Down
1 change: 0 additions & 1 deletion apps/st2-rules/rules-panel.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ export default class RulesPanel extends React.Component {
</PanelView>

<RulesDetails
ref={(ref) => this._details = ref}
onNavigate={(...args) => this.navigate(...args)}

id={id}
Expand Down
10 changes: 10 additions & 0 deletions apps/st2-workflows/workflows.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,16 @@ export default class Workflows extends Component {

const promise = (async () => {
if (existingAction) {

// remove "_name" key from parameter keys for successful request
if (meta.parameters) {
Object.keys(meta.parameters).forEach(key => {
if (meta.parameters[key]._name) {
delete meta.parameters[key]._name;
}
});
}

await api.request({ method: 'put', path: `/actions/${pack}.${meta.name}` }, meta);
}
else {
Expand Down

0 comments on commit 45960c3

Please sign in to comment.