diff --git a/lib/SLUB/LZA/TA/Command/sample_testing.pm b/lib/SLUB/LZA/TA/Command/sample_testing.pm index f62ec18504d8f738b54f1085ddc3e5bf3c4edebf..fe1ea1d582f4a2348590b1e8774f826f6da09be0 100644 --- a/lib/SLUB/LZA/TA/Command/sample_testing.pm +++ b/lib/SLUB/LZA/TA/Command/sample_testing.pm @@ -183,7 +183,8 @@ sub _check_aip ($sample, $opt) { $line->{aipid}=$sample->{uuid}; $line->{filePath}=$sample->{filePath}; - $line->{lzaid}=$sample->{transferMetadata}->[0]->{'bim:bag-info_dict'}->{'bim:SLUBArchiv-lzaId'}; + my $dict = $sample->{transferMetadata}->[0]->{'bim:bag-info_dict'}; + $line->{lzaid}= (ref $dict eq 'ARRAY') ? $dict->[0]->{'bim:SLUBArchiv-lzaId'} : $dict->{'bim:SLUBArchiv-lzaId'}; $line->{isvalid}=$is_valid ; $line->{checkdate}=localtime; $line->{creationdate}=localtime $sample->{created};