fix: Inituser (#386)

* fix: init user only create change pw event if pw set

* fix: init user only create change pw event if pw set

* fix: tests
This commit is contained in:
Fabi
2020-07-08 09:53:09 +02:00
committed by GitHub
parent c0f85c2733
commit a5bfd085a1
5 changed files with 12 additions and 5 deletions
@@ -282,7 +282,7 @@ func InitCodeVerifiedAggregate(aggCreator *es_models.AggregateCreator, existing
return nil, err
}
}
if password != nil {
if password != nil && password.Secret != nil {
agg, err = agg.AppendEvent(model.UserPasswordChanged, password)
if err != nil {
return nil, err