mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
fix: handle org de-/reactivate correctly (#3924)
This commit is contained in:
parent
9271623ec9
commit
6463b716ce
@ -33,6 +33,8 @@ func (wm *OrgWriteModel) Reduce() error {
|
||||
wm.State = domain.OrgStateInactive
|
||||
case *org.OrgReactivatedEvent:
|
||||
wm.State = domain.OrgStateActive
|
||||
case *org.OrgRemovedEvent:
|
||||
wm.State = domain.OrgStateRemoved
|
||||
case *org.OrgChangedEvent:
|
||||
wm.Name = e.Name
|
||||
case *org.DomainPrimarySetEvent:
|
||||
@ -51,6 +53,9 @@ func (wm *OrgWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
EventTypes(
|
||||
org.OrgAddedEventType,
|
||||
org.OrgChangedEventType,
|
||||
org.OrgDeactivatedEventType,
|
||||
org.OrgReactivatedEventType,
|
||||
org.OrgRemovedEventType,
|
||||
org.OrgDomainPrimarySetEventType).
|
||||
Builder()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user