|
@@ -132,6 +132,11 @@ func (repo *ClusterRepository) CreateCluster(
|
|
|
return nil, err
|
|
return nil, err
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if cluster.PreviewEnvsEnabled && !project.PreviewEnvsEnabled {
|
|
|
|
|
+ // this should only work if the corresponding project has preview environments enabled
|
|
|
|
|
+ cluster.PreviewEnvsEnabled = false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
assoc := repo.db.Model(&project).Association("Clusters")
|
|
assoc := repo.db.Model(&project).Association("Clusters")
|
|
|
|
|
|
|
|
if assoc.Error != nil {
|
|
if assoc.Error != nil {
|