Skip to content

Commit

Permalink
fix(server): prefer dataset values when merging properties (#388)
Browse files Browse the repository at this point in the history
  • Loading branch information
mimoham24 committed Mar 8, 2023
1 parent b17807a commit 8112f74
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions server/pkg/property/sealed_test.go
Expand Up @@ -447,13 +447,13 @@ func TestSealed_Interface(t *testing.T) {
"x": []map[string]interface{}{
{
"a": "a",
"b": "bbb",
"b": "b",
"id": i5id.String(),
},
},
"y": map[string]interface{}{
"a": "aaa",
"b": "bbb",
"b": "aaa",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion server/pkg/property/value_dataset.go
Expand Up @@ -56,7 +56,7 @@ func (v *ValueAndDatasetValue) Value() *Value {
if v == nil || v.t == ValueTypeUnknown {
return nil
}
if v.d != nil {
if v.d != nil && v.p == nil {
return valueFromDataset(v.d)
}
return v.p
Expand Down
2 changes: 1 addition & 1 deletion server/pkg/property/value_dataset_test.go
Expand Up @@ -295,7 +295,7 @@ func TestValueAndDatasetValue_Value(t *testing.T) {
d: dataset.ValueTypeString.MustBeValue("foo"),
p: ValueTypeString.MustBeValue("bar"),
},
want: ValueTypeString.MustBeValue("foo"),
want: ValueTypeString.MustBeValue("bar"),
},
{
name: "empty",
Expand Down

0 comments on commit 8112f74

Please sign in to comment.