mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:17:32 +00:00
fix: empty custom text changes push no events (#8054)
# Which Problems Are Solved If there is no custom text given, the call ends in an internal error as no events have to be pushed. # How the Problems Are Solved If no events have to be pushed, no trying to push an empty list of events. # Additional Changes No additional changes. # Additional Context Closes #6954
This commit is contained in:
@@ -23,6 +23,9 @@ func (c *Commands) SetOrgMessageText(ctx context.Context, resourceOwner string,
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(events) == 0 {
|
||||
return writeModelToObjectDetails(&existingMessageText.WriteModel), nil
|
||||
}
|
||||
pushedEvents, err := c.eventstore.Push(ctx, events...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user