@@ -, +, @@ targets like for bibliographic targets --- C4/Breeding.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/C4/Breeding.pm +++ a/C4/Breeding.pm @@ -502,6 +502,8 @@ sub ImportBreedingAuth { my $batch_id = GetZ3950BatchId($filename); my $searchbreeding = $dbh->prepare("select import_record_id from import_auths where control_number=? and authorized_heading=?"); + my $marc_type = shift || C4::Context->preference('marcflavour'); + my $controlnumber = $marcrecord->field('001')->data; # Normalize the record so it doesn't have separated diacritics @@ -510,7 +512,13 @@ sub ImportBreedingAuth { $searchbreeding->execute($controlnumber,$heading); my ($breedingid) = $searchbreeding->fetchrow; - return $breedingid if $breedingid; + if ($breedingid) + { + my $updbrd = $dbh->prepare("update import_records set marc=?,marcxml=? where import_record_id=?"); + $updbrd->execute($marcrecord->as_usmarc(),$marcrecord->as_xml($marc_type),$breedingid); + $updbrd->finish(); + return $breedingid; + } $breedingid = AddAuthToBatch($batch_id, 0, $marcrecord, $encoding); return $breedingid; } --