get_connection_targets: always return a list

Closes #152
Closes #153
This commit is contained in:
Birte Kristina Friesel 2024-08-09 12:20:06 +02:00
parent 8597cfa644
commit ba79f62f67
No known key found for this signature in database
GPG key ID: 19E6E524EBB177BA

View file

@ -1771,7 +1771,10 @@ sub get_connection_targets {
my $dest_id = $opt{eva}; my $dest_id = $opt{eva};
if ( $opt{destination_name} ) { if ( $opt{destination_name} ) {
return [ { eva => $opt{eva}, name => $opt{destination_name} } ]; return {
eva => $opt{eva},
name => $opt{destination_name}
};
} }
my $backend_id = $opt{backend_id}; my $backend_id = $opt{backend_id};
@ -1781,7 +1784,7 @@ sub get_connection_targets {
} }
if ( not $dest_id ) { if ( not $dest_id ) {
return []; return;
} }
my $dest_ids = [ my $dest_ids = [