Skip to content

Commit

Permalink
Fix ElectricalConnectionCharacteristicListDataType
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Apr 3, 2024
1 parent e9eec2c commit f4ab578
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion model/electricalconnection.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ type ElectricalConnectionCharacteristicDataElementsType struct {
}

type ElectricalConnectionCharacteristicListDataType struct {
ElectricalConnectionCharacteristicListData []ElectricalConnectionCharacteristicDataType `json:"electricalConnectionCharacteristicListData,omitempty"`
ElectricalConnectionCharacteristicData []ElectricalConnectionCharacteristicDataType `json:"electricalConnectionCharacteristicData,omitempty"`
}

type ElectricalConnectionCharacteristicListDataSelectorsType struct {
Expand Down
4 changes: 2 additions & 2 deletions model/electricalconnection_additions.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ var _ Updater = (*ElectricalConnectionCharacteristicListDataType)(nil)
func (r *ElectricalConnectionCharacteristicListDataType) UpdateList(remoteWrite bool, newList any, filterPartial, filterDelete *FilterType) {
var newData []ElectricalConnectionCharacteristicDataType
if newList != nil {
newData = newList.(*ElectricalConnectionCharacteristicListDataType).ElectricalConnectionCharacteristicListData
newData = newList.(*ElectricalConnectionCharacteristicListDataType).ElectricalConnectionCharacteristicData
}

r.ElectricalConnectionCharacteristicListData = UpdateList(remoteWrite, r.ElectricalConnectionCharacteristicListData, newData, filterPartial, filterDelete)
r.ElectricalConnectionCharacteristicData = UpdateList(remoteWrite, r.ElectricalConnectionCharacteristicData, newData, filterPartial, filterDelete)
}

// ElectricalConnectionParameterDescriptionListDataType
Expand Down
6 changes: 3 additions & 3 deletions model/electricalconnection_additions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ func TestElectricalConnectionDescriptionListDataType_Update(t *testing.T) {

func TestElectricalConnectionCharacteristicListDataType_Update(t *testing.T) {
sut := ElectricalConnectionCharacteristicListDataType{
ElectricalConnectionCharacteristicListData: []ElectricalConnectionCharacteristicDataType{
ElectricalConnectionCharacteristicData: []ElectricalConnectionCharacteristicDataType{
{
ElectricalConnectionId: util.Ptr(ElectricalConnectionIdType(0)),
ParameterId: util.Ptr(ElectricalConnectionParameterIdType(0)),
Expand All @@ -1164,7 +1164,7 @@ func TestElectricalConnectionCharacteristicListDataType_Update(t *testing.T) {
}

newData := ElectricalConnectionCharacteristicListDataType{
ElectricalConnectionCharacteristicListData: []ElectricalConnectionCharacteristicDataType{
ElectricalConnectionCharacteristicData: []ElectricalConnectionCharacteristicDataType{
{
ElectricalConnectionId: util.Ptr(ElectricalConnectionIdType(1)),
ParameterId: util.Ptr(ElectricalConnectionParameterIdType(0)),
Expand All @@ -1177,7 +1177,7 @@ func TestElectricalConnectionCharacteristicListDataType_Update(t *testing.T) {
// Act
sut.UpdateList(false, &newData, NewFilterTypePartial(), nil)

data := sut.ElectricalConnectionCharacteristicListData
data := sut.ElectricalConnectionCharacteristicData
// check the non changing items
assert.Equal(t, 2, len(data))
item1 := data[0]
Expand Down

0 comments on commit f4ab578

Please sign in to comment.