mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:47:32 +00:00
fix: migration from es v1 (#1462)
* handle old step1 * add migration ES V1 to operator
This commit is contained in:
@@ -3,6 +3,7 @@ package iam
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/caos/zitadel/internal/eventstore"
|
||||
|
||||
"github.com/caos/zitadel/internal/domain"
|
||||
@@ -34,6 +35,10 @@ func SetupStepMapper(event *repository.Event) (eventstore.EventReader, error) {
|
||||
step := &SetupStepEvent{
|
||||
BaseEvent: *eventstore.BaseEventFromRepo(event),
|
||||
Done: eventstore.EventType(event.Type) == SetupDoneEventType,
|
||||
Step: domain.Step1,
|
||||
}
|
||||
if len(event.Data) == 0 {
|
||||
return step, nil
|
||||
}
|
||||
err := json.Unmarshal(event.Data, step)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user