[Koha-patches] [PATCH 17/55] Minor bug fix rebuild_zebra
LAURENT Henri-Damien
henridamien.laurent at biblibre.com
Thu Apr 8 11:41:15 CEST 2010
Le 07/04/2010 18:32, Galen Charlton a écrit :
> Hi,
>
> On Wed, Mar 10, 2010 at 4:25 PM, Henri-Damien LAURENT
> <henridamien.laurent at biblibre.com> wrote:
>> From: Paul Poulain <paul.poulain at biblibre.com>
>>
>> removing only is2709 for authorities
>
> Do you have evidence that the issue behind why that restriction exists
> in the first place has been resolved? See commit
> 57d128f72781fc854936ab0c4e8dffde167108bc.
Using grs and UNIMARC authorities with marcxml I had no problems indexing.
>
>> + if ($marc->fields()){
>> + return $marc;
>> + } else {
>> + return undef;
>> + }
>> }
>
> This is superfluous - by the time it gets to this point, it will
> contain a valid MARC::Record object. If somehow it is retrieving a
> MARC record that has no fields defined, that indicates a data problem
> that needs to be dealt with lower down in the stack.
Should we fail each time a record cannot be decoded, would it be from
XML or iso2709, it seems that GetAuthority can also return without
raising errors if it is
my $record=eval
{MARC::Record->new_from_xml(StripNonXmlChars($marcxml),'UTF-8',
(C4::Context->preference("marcflavour") eq
"UNIMARC"?"UNIMARCAUTH":C4::Context->preference("marcflavour")))};
return undef if ($@);
So GetAuthority can return non marc data.
And then fields would fail.
More information about the Koha-patches
mailing list