mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-29 18:42:15 +00:00
fix: check if org exists when setting features (#1813)
* fix: check if org exists when setting features * fix tests
This commit is contained in:
@@ -13,8 +13,12 @@ func (c *Commands) SetOrgFeatures(ctx context.Context, resourceOwner string, fea
|
||||
if resourceOwner == "" {
|
||||
return nil, caos_errs.ThrowInvalidArgument(nil, "Features-G5tg", "Errors.ResourceOwnerMissing")
|
||||
}
|
||||
err := c.checkOrgExists(ctx, resourceOwner)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
existingFeatures := NewOrgFeaturesWriteModel(resourceOwner)
|
||||
err := c.eventstore.FilterToQueryReducer(ctx, existingFeatures)
|
||||
err = c.eventstore.FilterToQueryReducer(ctx, existingFeatures)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user