Bug 28510: Remove unnecessary conditional
It makes sense to use items by branch to get the list of branches, as it already tells use which branches have available items. We could use branches to pull from instead, but all we would accomplish is added extra ununsed loop iterations. We already know that any additional branches in the branches to pull loop have no items to fill holds. If they did, they would be in the items_by_branch hash. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
ba23348db6
commit
d284735d05
|
|
@ -596,12 +596,7 @@ sub MapItemsToHoldRequests {
|
|||
}
|
||||
|
||||
unless ($itemnumber) {
|
||||
# not found yet, fall back to basics
|
||||
if ($branches_to_use) {
|
||||
$pull_branches = $branches_to_use;
|
||||
} else {
|
||||
$pull_branches = [keys %items_by_branch];
|
||||
}
|
||||
$pull_branches = [keys %items_by_branch];
|
||||
|
||||
# Try picking items where the home and pickup branch match first
|
||||
PULL_BRANCHES:
|
||||
|
|
|
|||
Loading…
Reference in New Issue