Skip to content

Commit

Permalink
add back the original check
Browse files Browse the repository at this point in the history
  • Loading branch information
netramali committed Feb 3, 2025
1 parent 670d9bf commit 8c5b4bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions request.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ func unmarshalNode(data *Node, model reflect.Value, included *map[string]*Node)
if relationship.Data == nil {
// Explicit null supplied for the field value
// If a nullable relationship we set the field value to a map with a single entry
if isExplicitNull {
if isExplicitNull && strings.HasPrefix(fieldType.Type.Name(), "NullableRelationship[") {
fieldValue.Set(reflect.MakeMapWithSize(fieldValue.Type(), 1))
fieldValue.SetMapIndex(reflect.ValueOf(false), m)
}
Expand All @@ -531,7 +531,6 @@ func unmarshalNode(data *Node, model reflect.Value, included *map[string]*Node)
continue
}


err = unmarshalNodeMaybeChoice(&m, relationship.Data, annotation, choiceMapping, included)
if err != nil {
er = err
Expand Down

0 comments on commit 8c5b4bd

Please sign in to comment.