Bug 25266: Fix error when no later order
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 25 May 2020 07:33:10 +0000 (09:33 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 15 Jun 2020 08:32:20 +0000 (10:32 +0200)
If no late order we got:
"Argument passed to the 'IN' operator can not be undefined"

It highlights a context error

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Alex Arnaud <alex.arnaud@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

acqui/lateorders.pl

index 6521d1d..65d4703 100755 (executable)
@@ -151,7 +151,7 @@ my @lateorders = Koha::Acquisition::Orders->filter_by_lates(
 my $booksellers = Koha::Acquisition::Booksellers->search(
     {
         id => {
-            -in => map { $_->basket->booksellerid } @lateorders
+            -in => [ map { $_->basket->booksellerid } @lateorders ]
         },
     }
 );