fix for broken environment count inheritance (#695)

This commit is contained in:
Michael Quigley 2024-07-09 11:37:29 -04:00
parent 187c06aac2
commit 3934020265
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62

View File

@ -68,7 +68,7 @@ func (a *Agent) CanCreateEnvironment(acctId int, trx *sqlx.Tx) (bool, error) {
if err != nil { if err != nil {
return false, err return false, err
} }
if len(envs)+1 > a.cfg.Environments { if len(envs)+1 > ul.resource.GetEnvironments() {
return false, nil return false, nil
} }
} }