projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 13157: UNIMARC holdingbranch facet is 995$c not 995$b
[koha.git]
/
C4
/
Creators
/
Batch.pm
diff --git
a/C4/Creators/Batch.pm
b/C4/Creators/Batch.pm
index
9306263
..
28beeb7
100644
(file)
--- a/
C4/Creators/Batch.pm
+++ b/
C4/Creators/Batch.pm
@@
-199,7
+199,11
@@
sub remove_duplicates {
my %seen=();
my $query = "DELETE FROM creator_batches WHERE label_id = ?;"; # ORDER BY timestamp ASC LIMIT ?;";
my $sth = C4::Context->dbh->prepare($query);
my %seen=();
my $query = "DELETE FROM creator_batches WHERE label_id = ?;"; # ORDER BY timestamp ASC LIMIT ?;";
my $sth = C4::Context->dbh->prepare($query);
- my @duplicate_items = grep{$seen{$_->{'item_number'}}++} @{$self->{'items'}};
+ my @duplicate_items = grep{
+ $_->{'item_number'}
+ ? $seen{$_->{'item_number'}}++
+ : $seen{$_->{'borrower_number'}}++
+ } @{$self->{'items'}};
foreach my $item (@duplicate_items) {
$sth->execute($item->{'label_id'});
if ($sth->err) {
foreach my $item (@duplicate_items) {
$sth->execute($item->{'label_id'});
if ($sth->err) {