From: Tara L Andrews Date: Tue, 2 Jul 2013 15:56:53 +0000 (+0200) Subject: duplication candidates belonging to no selected witnesses should be ignored X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=769401c346187d797fdb5ff1b860a1c117f8c5be;p=scpubgit%2Fstemmaweb.git duplication candidates belonging to no selected witnesses should be ignored --- diff --git a/lib/stemmaweb/Controller/Relation.pm b/lib/stemmaweb/Controller/Relation.pm index 7dd0c73..46fb11f 100644 --- a/lib/stemmaweb/Controller/Relation.pm +++ b/lib/stemmaweb/Controller/Relation.pm @@ -425,10 +425,12 @@ sub duplicate :Chained('text') :PathPart :Args(0) { foreach my $rid ( $c->request->param('readings[]') ) { my $numwits = 0; my $rdg = $collation->reading( $rid ); + $DB::single = 1; foreach my $rwit ( $rdg->witnesses( $rid ) ) { $numwits++ if exists $wits{$rwit}; } - if( $numwits > 0 && $numwits < keys( %wits ) ) { + next unless $numwits; # Disregard readings with none of our witnesses + if( $numwits < keys( %wits ) ) { $errmsg = "Reading $rid contains some but not all of the specified witnesses."; last; } elsif( exists $rdgranks{ $rdg->rank } ) {