LP#1389403 Normalizer detection compatibility with LP#1373693
authorDan Wells <dbw2@calvin.edu>
Wed, 19 Nov 2014 17:16:03 +0000 (12:16 -0500)
committerBen Shum <bshum@biblio.org>
Tue, 16 Dec 2014 19:53:05 +0000 (14:53 -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>
Signed-off-by: Ben Shum <bshum@biblio.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
                 },