Commit 776cbe8f authored by Koosha Khajeh Moogahi's avatar Koosha Khajeh Moogahi Committed by Frédéric Buclin

Bug 765558: params_to_objects() does not work properly in consecutive calls

r/a=LpSolit
parent 0f4ecd60
......@@ -108,11 +108,12 @@ sub translate {
sub params_to_objects {
my ($params, $class) = @_;
my (@objects, @objects_by_ids);
my @objects = map { $class->check($_) }
@objects = map { $class->check($_) }
@{ $params->{names} } if $params->{names};
my @objects_by_ids = map { $class->check({ id => $_ }) }
@objects_by_ids = map { $class->check({ id => $_ }) }
@{ $params->{ids} } if $params->{ids};
push(@objects, @objects_by_ids);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment