mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-12 11:53:39 +00:00
fix(metadata): corrected handling of remove metadata events (#4505)
* fix(metadata): corrected handling of remove metadata events * remove unnecessary method Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
parent
0b7ca8a143
commit
c9e2e6bc33
@ -24,6 +24,9 @@ func (wm *MetadataWriteModel) Reduce() error {
|
||||
wm.Value = e.Value
|
||||
wm.State = domain.MetadataStateActive
|
||||
case *metadata.RemovedEvent:
|
||||
if wm.Key != e.Key {
|
||||
continue
|
||||
}
|
||||
wm.State = domain.MetadataStateRemoved
|
||||
case *metadata.RemovedAllEvent:
|
||||
wm.State = domain.MetadataStateRemoved
|
||||
|
@ -35,10 +35,6 @@ func (wm *UserMetadataWriteModel) AppendEvents(events ...eventstore.Event) {
|
||||
}
|
||||
}
|
||||
|
||||
func (wm *UserMetadataWriteModel) Reduce() error {
|
||||
return wm.MetadataWriteModel.Reduce()
|
||||
}
|
||||
|
||||
func (wm *UserMetadataWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
return eventstore.NewSearchQueryBuilder(eventstore.ColumnsEvent).
|
||||
ResourceOwner(wm.ResourceOwner).
|
||||
|
Loading…
x
Reference in New Issue
Block a user