fix: translate panic for changes (#433)

* fix: refactor object-changes

* fix: check if changes are nil
This commit is contained in:
Silvan 2020-07-09 17:16:47 +02:00 committed by GitHub
parent cde6231164
commit 66376f9213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,6 +3,9 @@ package management
import "github.com/caos/zitadel/internal/api/grpc/server/middleware"
func (c *Changes) Localizers() []middleware.Localizer {
if c == nil {
return nil
}
localizers := make([]middleware.Localizer, len(c.Changes))
for i, change := range c.Changes {
localizers[i] = change.EventType