Skip to content

Commit 0965dc6

Browse files
committed
Updated systemowner
1 parent e544953 commit 0965dc6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/Service/BaseImporter.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ protected function convertDate(string $date): \DateTime
7575
*/
7676
protected function convertSystemOwner(array $systemOwner): string
7777
{
78+
if (empty($systemOwner)) {
79+
return '';
80+
}
81+
7882
return $systemOwner[0]->LookupValue ?? '';
7983
}
8084

src/Service/ReportImporter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function import(string $src, ?ProgressBar $progressBar = null): void
7575
$report->setSysDataToScience($this->sanitizeText($entry->{'Videregivelse_x0020_af_x0020_opl'} ?? ''));
7676

7777
// @todo Handle array of objects
78-
$report->setSysSystemOwner($this->convertSystemOwner($entry->{'Systemejer2'} ?? ''));
78+
$report->setSysSystemOwner($this->convertSystemOwner($entry->{'Systemejer2'} ?? []));
7979

8080
// Set group and subGroup.
8181
if (!is_null($report->getSysOwner())) {

0 commit comments

Comments
 (0)