Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
jgough committed Dec 11, 2024
1 parent 799e8e6 commit 599f78c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion logverification/eventsv1.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ package logverification
import (
"encoding/json"
"fmt"
"reflect"
"sort"
"strings"

"github.com/datatrails/go-datatrails-common-api-gen/assets/v2/assets"
"github.com/datatrails/go-datatrails-common-api-gen/attribute/v2/attribute"
"github.com/datatrails/go-datatrails-common-api-gen/marshalers/simpleoneof"
"github.com/google/uuid"
"google.golang.org/protobuf/encoding/protojson"

Expand Down Expand Up @@ -115,7 +117,14 @@ func NewVerifiableEventsV1Event(eventJson []byte, logTenant string, opts ...Veri

attribute := &attribute.Attribute{}

err = protojson.Unmarshal(protoAttribute, attribute)
marshaler := simpleoneof.NewFlatMarshaler(
[]reflect.Type{
reflect.TypeOf(entry),
},
nil,
)

err = marshaler.Unmarshal(protoAttribute, attribute)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 599f78c

Please sign in to comment.