Browse Source

use null env config on list

Ian Edwards 2 years ago
parent
commit
d8f6a18b59
2 changed files with 2 additions and 2 deletions
  1. 1 1
      api/server/router/porter_app.go
  2. 1 1
      internal/repository/gorm/porter_app.go

+ 1 - 1
api/server/router/porter_app.go

@@ -83,7 +83,7 @@ func getStackRoutes(
 		Router:   r,
 	})
 
-	// GET /api/projects/{project_id}/clusters/{cluster_id}/stacks/{name} -> porter_app.NewPorterAppListHandler
+	// GET /api/projects/{project_id}/clusters/{cluster_id}/stacks -> porter_app.NewPorterAppListHandler
 	listPorterAppEndpoint := factory.NewAPIEndpoint(
 		&types.APIRequestMetadata{
 			Verb:   types.APIVerbList,

+ 1 - 1
internal/repository/gorm/porter_app.go

@@ -27,7 +27,7 @@ func (repo *PorterAppRepository) CreatePorterApp(a *models.PorterApp) (*models.P
 func (repo *PorterAppRepository) ListPorterAppByClusterID(clusterID uint) ([]*models.PorterApp, error) {
 	apps := []*models.PorterApp{}
 
-	if err := repo.db.Where("cluster_id = ?", clusterID).Find(&apps).Error; err != nil {
+	if err := repo.db.Where("cluster_id = ? AND environment_config_id IS NULL", clusterID).Find(&apps).Error; err != nil {
 		return nil, err
 	}