Bug 16272 [QA Followup] - Indexer fails on indexing temparary testing records

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Kyle M Hall 2016-08-18 16:33:00 +00:00
parent c4fcb0d2a1
commit c4ab843429
1 changed files with 4 additions and 2 deletions

View File

@ -177,8 +177,10 @@ sub _sanitise_records {
# the Tannhauser gate. MARC records where 999$c doesn't match the
# biblionumber column. All those moments will be lost in time... like
# tears in rain...
$rec->delete_fields($rec->field('999'));
$rec->append_fields(MARC::Field->new('999','','','c' => $bibnum, 'd' => $bibnum));
if ( $rec ) {
$rec->delete_fields($rec->field('999'));
$rec->append_fields(MARC::Field->new('999','','','c' => $bibnum, 'd' => $bibnum));
}
}
}