Skip to content

Commit 6d764f3

Browse files
committed
fix
1 parent d8ea79f commit 6d764f3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pkg/plugin/adaptor/adaptor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func GetPluginStepDbObject(pluginStepDto *pluginBean.PluginStepsDto, pluginVersi
2222
Name: pluginStepDto.Name,
2323
Description: pluginStepDto.Description,
2424
Index: 1,
25-
StepType: repository.PLUGIN_STEP_TYPE_INLINE,
25+
StepType: pluginStepDto.GetStepType(),
2626
RefPluginId: pluginStepDto.RefPluginId,
2727
OutputDirectoryPath: pluginStepDto.OutputDirectoryPath,
2828
DependentOnStep: pluginStepDto.DependentOnStep,

pkg/plugin/bean/bean.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,14 @@ type PluginStepsDto struct {
310310
ScriptId int `json:"-"`
311311
}
312312

313+
// GetStepType returns stepType if present in PluginStepsDto else returns PLUGIN_STEP_TYPE_INLINE as default stepType
314+
func (r *PluginStepsDto) GetStepType() repository.PluginStepType {
315+
if len(r.StepType) > 0 {
316+
return r.StepType
317+
}
318+
return repository.PLUGIN_STEP_TYPE_INLINE
319+
}
320+
313321
func (r *PluginStepsDto) ID() int {
314322
return r.Id
315323
}

0 commit comments

Comments
 (0)