Skip to content

Commit 4365fa0

Browse files
committed
minor fix
1 parent b766ef6 commit 4365fa0

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pkg/pipeline/repository/PipelineStageRepository.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package repository
1818

1919
import (
20-
"github.com/devtron-labs/devtron/internal/util"
2120
"github.com/devtron-labs/devtron/pkg/plugin/repository"
2221
"github.com/devtron-labs/devtron/pkg/sql"
2322
"github.com/go-pg/pg"
@@ -908,11 +907,9 @@ func (impl *PipelineStageRepositoryImpl) CheckIfPluginExistsInPipelineStage(pipe
908907
query.Where("ps.cd_pipeline_id= ?", pipelineId)
909908
}
910909
err := query.Select()
911-
if err != nil && !util.IsErrNoRows(err) {
910+
if err != nil {
912911
impl.logger.Errorw("error in getting plugin stage step by pipelineId, stageType nad plugin id", "pipelineId", pipelineId, "stageType", stageType.ToString(), "pluginId", pluginId, "err", err)
913912
return false, err
914-
} else if util.IsErrNoRows(err) {
915-
return false, nil
916913
}
917914
return step.Id != 0, nil
918915
}

pkg/workflow/dag/WorkflowDagExecutor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ func (impl *WorkflowDagExecutorImpl) isScanPluginConfiguredAtPipelineStage(pipel
754754
return false, nil
755755
}
756756
isScanPluginConfigured, err := impl.pipelineStageRepository.CheckIfPluginExistsInPipelineStage(pipelineId, pipelineStage, plugin[0].Id)
757-
if err != nil {
757+
if err != nil && !util.IsErrNoRows(err) {
758758
impl.logger.Errorw("error in getting ci pipeline plugin", "err", err, "pipelineId", pipelineId, "pluginId", plugin[0].Id)
759759
return false, err
760760
}

0 commit comments

Comments
 (0)