Skip to content

Commit

Permalink
fix: change type of Marktlokation.Katasterinformation to list
Browse files Browse the repository at this point in the history
  • Loading branch information
Konstantin committed Jan 16, 2025
1 parent 48331fe commit 8f9fa6d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bo/marktlokation.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type Marktlokation struct {
// only one of the following three optional address attributes can be set
Lokationsadresse *com.Adresse `json:"lokationsadresse,omitempty" validate:"required_without_all=Geoadresse Katasterinformation"` // Lokationsadresse is the address at which the energy supply or feed-in takes place
Geoadresse *com.Geokoordinaten `json:"geoadresse,omitempty" validate:"required_without_all=Lokationsadresse Katasterinformation"` // Geoadresse are the gps coordinates
Katasterinformation *com.Katasteradresse `json:"katasterinformation,omitempty" validate:"required_without_all=Lokationsadresse Geoadresse"` // Katasterinformation is the Cadastre address
Katasterinformation []com.Katasteradresse `json:"katasterinformation,omitempty" validate:"required_without_all=Lokationsadresse Geoadresse"` // Katasterinformation is the Cadastre address; It's a list since v0.34.0 because the MaLo Ident model classes are also list like
ZugehoerigeMesslokationen []com.Messlokationszuordnung `json:"zugehoerigemesslokationen,omitempty"` // ZugehoerigeMesslokationen is a list of MeLos belonging to this market location

Regelzone *string `json:"regelzone,omitempty"`
Expand Down
11 changes: 6 additions & 5 deletions bo/marktlokation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,13 @@ func Test_Failed_MarktlokationValidation(t *testing.T) {
Hausnummer: "27A",
Landescode: internal.Ptr(landescode.DE),
},
Katasterinformation: &com.Katasteradresse{
GemarkungFlur: "Foo",
Flurstueck: "Bar",
Katasterinformation: []com.Katasteradresse{
{
GemarkungFlur: "Foo",
Flurstueck: "Bar",
},
},
},
},
}},
"ne": {
bo.Marktlokation{
Geschaeftsobjekt: bo.Geschaeftsobjekt{
Expand Down

0 comments on commit 8f9fa6d

Please sign in to comment.