Skip to content

Commit

Permalink
S:D:H:RecordLink: FIX: mehrere Ursprungsbelege unterstützen
Browse files Browse the repository at this point in the history
  • Loading branch information
z4m1n0 committed Oct 13, 2023
1 parent 54b9328 commit e7eab9e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SL/DB/Helper/RecordLink.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,14 @@ sub link_records {
my %allowed_linked_record_items = map {$_ => 1} @$allowed_linked_record_items;

return 1 unless my $from_record_ids = $self->{RECORD_ID()};
my @from_record_ids = split / /, $from_record_ids;

my $from_record_type = $self->{RECORD_TYPE_REF()};
unless ($allowed_linked_records{$from_record_type}) {
croak("Not allowed @{[ RECORD_TYPE_REF ]}: $from_record_type");
}

for my $id (listify($from_record_ids)) {
for my $id (@from_record_ids) {
my $from_record = $from_record_type->new(id => $id)->load;
$from_record->link_to_record($self);
}
Expand Down

0 comments on commit e7eab9e

Please sign in to comment.