We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 952a12d + 0ee9a01 commit 3356c63Copy full SHA for 3356c63
internal/sql/repository/pipelineConfig/CiTemplateRepository.go
@@ -96,8 +96,10 @@ func (impl CiTemplateRepositoryImpl) FindByAppId(appId int) (ciTemplate *CiTempl
96
97
func (impl CiTemplateRepositoryImpl) FindByDockerRegistryId(dockerRegistryId string) (ciTemplates []*CiTemplate, err error) {
98
err = impl.dbConnection.Model(&ciTemplates).
99
- Where("docker_registry_id =? ", dockerRegistryId).
100
- Where("active = ?", true).
+ Join("JOIN app a ON ci_template.app_id = a.id").
+ Where("ci_template.docker_registry_id = ?", dockerRegistryId).
101
+ Where("ci_template.active = ?", true).
102
+ Where("a.active = ?", true).
103
Select()
104
return ciTemplates, err
105
}
0 commit comments