LP#1389403 Normalizer detection compatibility with LP#1373693 user/kmlussier/lp1389403-cn_normalizer_detection
authorDan Wells <dbw2@calvin.edu>
Wed, 19 Nov 2014 17:16:03 +0000 (12:16 -0500)
committerKathy Lussier <klussier@masslnc.org>
Wed, 19 Nov 2014 21:15:47 +0000 (16:15 -0500)
In LP#1373693, $ou_ids become an optional argument when at the top of
the tree.  We need to account for that.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/SuperCat.pm

index 61e9c07..7f53b53 100644 (file)
@@ -356,7 +356,7 @@ sub _label_sortkey_from_label {
                 "open-ils.cstore.direct.asset.call_number.search.atomic",
                 { label_sortkey
                              => { ">=" => [$closest_cn->[0]->label_class->normalizer, $label] },
-                  owning_lib => $ou_ids,
+                  (scalar(@$ou_ids) ? (owning_lib => $ou_ids) : ()),
                   deleted    => 'f',
                   @$cp_filter
                 },