Skip to content

Commit 8f9a837

Browse files
committed
query fix
1 parent ba51241 commit 8f9a837

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/sql/repository/AppListingRepository.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,7 @@ func (impl *AppListingRepositoryImpl) FetchAppsEnvContainers(envId int, appIds [
145145
LEFT JOIN
146146
(SELECT pco.pipeline_id,MAX(pco.created_on) as last_deployed_time from pipeline_config_override pco
147147
GROUP BY pco.pipeline_id) ld ON ld.pipeline_id = p.id
148-
WHERE a.active = true
149-
ORDER BY a.app_name `
148+
WHERE a.active = true `
150149

151150
queryParams := []interface{}{envId, envId}
152151

@@ -156,6 +155,8 @@ func (impl *AppListingRepositoryImpl) FetchAppsEnvContainers(envId int, appIds [
156155
queryParams = append(queryParams, pg.In(appIds))
157156
}
158157

158+
query += " ORDER BY a.app_name "
159+
159160
if limit > 0 {
160161
query += fmt.Sprintf("LIMIT ? ")
161162
queryParams = append(queryParams, limit)

0 commit comments

Comments
 (0)