Bug 18822: Check if we have MARC::Record and convert if not when using ES
authorNick Clemens <nick@bywatersolutions.com>
Fri, 25 May 2018 09:32:58 +0000 (09:32 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 13 Jul 2018 12:15:32 +0000 (12:15 +0000)
commit1563ec38132ec687c714a5b64489d79e8c02476a
tree61bb306834f9c11012dd1c71452c4296463b03a1
parentcfca339d03777d4404153224a312012a6b89392d
Bug 18822: Check if we have MARC::Record and convert if not when using ES

The new_record_from_zebra subroutine assumes that when using ES we
always get MARC::Record objects when using ES, but sometimes we get them as xml via Z39 or
internally. This adds a test to new_from_zebra to confirm we have a
record object and to convert it if not

To test:
1 - Perform an advanced search from the advanced editor, make sure to
select 'Local catalog' and a remote source
2 - Error 'Internal search error [Object object]'
3 - Apply patch
4 - Repeat search, success!
5 - Select and deselect various servers, search should still work

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Search.pm