Skip to content

Commit e169d24

Browse files
authored
Merge pull request #132 from OS2Forms/f/OS-115_dawa_address
OS-115 Skipping address with empty matrikelnummer
2 parents 07d7aa2 + 611f2b9 commit e169d24

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

Diff for: CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ https://github.com/OS2Forms/os2forms_docs/blob/master/docs/releases/2024-Q4-Rele
8787

8888
## [3.16.0-beta1] 2024-08-27
8989

90+
## [3.16.0] 2024-08-27
91+
92+
f/OS-115_dawa_address
93+
- [OS-115] Skipping empty maktrikula objects
94+
95+
96+
9097
[#110](https://github.com/OS2Forms/os2forms/pull/110)
9198

9299
- Obsolete module removing - os2forms_consent

Diff for: modules/os2forms_dawa/src/Plugin/os2web/DataLookup/DatafordelerDataLookup.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,12 @@ public function getMatrikulaEntries(string $matrikulaId) : array {
9999
if (NestedArray::keyExists($jsonDecoded, ['features', 0, 'properties', 'jordstykke'])) {
100100
$jordstykker = NestedArray::getValue($jsonDecoded, ['features', 0, 'properties', 'jordstykke']);
101101
foreach ($jordstykker as $jordstyk) {
102-
$matrikulaEntries[] = new DatafordelerMatrikula($jordstyk);
102+
try {
103+
$matrikulaEntries[] = new DatafordelerMatrikula($jordstyk);
104+
}
105+
catch (\TypeError $e) {
106+
// Could not create matrikula object.
107+
}
103108
}
104109
}
105110
}

0 commit comments

Comments
 (0)