From 3ef0a98a1709f9fc367f3ee9c998a4cc0d2f20bb Mon Sep 17 00:00:00 2001 From: Noah Metz Date: Sun, 1 Oct 2023 20:59:45 -0600 Subject: [PATCH] Fixed broken deserialization of NodeID and uuid.UUID --- context.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/context.go b/context.go index 2ab003f..18c313f 100644 --- a/context.go +++ b/context.go @@ -1084,7 +1084,8 @@ func NewContext(db * badger.DB, log Logger) (*Context, error) { return nil, nil, value, err } - id_value := reflect.ValueOf(id) + id_value := reflect.New(node_id_type).Elem() + id_value.Set(reflect.ValueOf(id)) return node_id_type, &id_value, value, nil } }) @@ -1125,7 +1126,8 @@ func NewContext(db * badger.DB, log Logger) (*Context, error) { return nil, nil, value, err } - id_value := reflect.ValueOf(id) + id_value := reflect.New(uuid_type).Elem() + id_value.Set(reflect.ValueOf(id)) return uuid_type, &id_value, value, nil } })