From 1c14fb86cf1b40ea0a91701d62a1a77b3146026c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Wed, 11 Jun 2014 17:47:50 +0200 Subject: [PATCH] =?utf8?q?RecordLinks:=20fr=C3=BChzeitig=20abbrechen,=20we?= =?utf8?q?nn=20keine=20links=20gefunden=20wurden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/LinkedRecords.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SL/DB/Helper/LinkedRecords.pm b/SL/DB/Helper/LinkedRecords.pm index cca9fe3c1..182f3bdcc 100644 --- a/SL/DB/Helper/LinkedRecords.pm +++ b/SL/DB/Helper/LinkedRecords.pm @@ -148,6 +148,9 @@ sub _linked_records_implementation { ORDER BY ${wanted}_table, ${wanted}_id, depth ASC; my $links = selectall_hashref_query($::form, $::form->get_standard_dbh, $query, $self->id, $self->meta->table); + + return [] unless @$links; + my $link_objs = SL::DB::Manager::RecordLink->get_all(query => [ id => [ map { $_->{id} } @$links ] ]); my @objects = map { $get_objects->($_) } @$link_objs; -- 2.20.1