fix: ensure domain policy is read for the correct org (#4872)

This commit is contained in:
Livio Spring
2022-12-13 07:37:50 +01:00
committed by GitHub
parent e4531291f5
commit 33e973f015
7 changed files with 27 additions and 16 deletions

View File

@@ -30,7 +30,7 @@ func (c *Commands) prepareAddOrgDomain(a *org.Aggregate, addDomain string, userI
if existing != nil && existing.State == domain.OrgDomainStateActive {
return nil, errors.ThrowAlreadyExists(nil, "V2-e1wse", "Errors.Already.Exists")
}
domainPolicy, err := domainPolicyWriteModel(ctx, filter)
domainPolicy, err := domainPolicyWriteModel(ctx, filter, a.ID)
if err != nil {
return nil, err
}