Skip to content

Commit 45960c3

Browse files
authored
Merge pull request #961 from Jappzy/fix-save-workflow-params
fix: Save workflow error when updating with parameters
2 parents bf005ce + 9131fdf commit 45960c3

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

apps/st2-actions/actions-panel.component.js

-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,6 @@ export default class ActionsPanel extends React.Component {
303303
</PanelView>
304304

305305
<ActionsDetails
306-
ref={(ref) => this._details = ref}
307306
handleNavigate={(...args) => this.navigate(...args)}
308307
handleRun={(...args) => this.handleRun(...args)}
309308
handleDelete={(...arg) => this.handleDelete(...arg)}

apps/st2-history/history-panel.component.js

-1
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,6 @@ export default class HistoryPanel extends React.Component {
531531
</PanelView>
532532

533533
<HistoryDetails
534-
ref={(ref) => this._details = ref}
535534
handleNavigate={(...args) => this.navigate(...args)}
536535
handleRerun={(...args) => this.handleRerun(...args)}
537536
handleCancel={(...args) => this.handleCancel(...args)}

apps/st2-rules/rules-panel.component.js

-1
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ export default class RulesPanel extends React.Component {
281281
</PanelView>
282282

283283
<RulesDetails
284-
ref={(ref) => this._details = ref}
285284
onNavigate={(...args) => this.navigate(...args)}
286285

287286
id={id}

apps/st2-workflows/workflows.component.js

+10
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,16 @@ export default class Workflows extends Component {
266266

267267
const promise = (async () => {
268268
if (existingAction) {
269+
270+
// remove "_name" key from parameter keys for successful request
271+
if (meta.parameters) {
272+
Object.keys(meta.parameters).forEach(key => {
273+
if (meta.parameters[key]._name) {
274+
delete meta.parameters[key]._name;
275+
}
276+
});
277+
}
278+
269279
await api.request({ method: 'put', path: `/actions/${pack}.${meta.name}` }, meta);
270280
}
271281
else {

0 commit comments

Comments
 (0)