Bug 12478: make authid get to the templates properly
authorRobin Sheat <robin@catalyst.net.nz>
Wed, 4 Mar 2015 05:19:25 +0000 (18:19 +1300)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Tue, 26 Apr 2016 20:20:05 +0000 (20:20 +0000)
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jesse Weaver <jweaver@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Koha/SearchEngine/Elasticsearch/Search.pm

index d48bdcd..e91e4f1 100644 (file)
@@ -161,7 +161,9 @@ sub search_auth_compat {
 
             # I wonder if these should be real values defined in the mapping
             # rather than hard-coded conversions.
-            $result{authid} = $record->{ Local-Number };
+            # Our results often come through as nested arrays, to fix this
+            # requires changes in catmandu.
+            $result{authid} = $record->{ 'Local-Number' }[0][0];
 
             # TODO put all this info into the record at index time so we
             # don't have to go and sort it all out now.