From: Tara L Andrews Date: Thu, 18 Jul 2013 03:32:05 +0000 (+0200) Subject: Issue #16: look for flag to refrain from sending checkalign suggestions X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8880c19d252b9192c0b7ac816d3b8457b38c28a2;p=scpubgit%2Fstemmaweb.git Issue #16: look for flag to refrain from sending checkalign suggestions --- diff --git a/lib/stemmaweb/Controller/Relation.pm b/lib/stemmaweb/Controller/Relation.pm index bfe9d87..ca3a459 100644 --- a/lib/stemmaweb/Controller/Relation.pm +++ b/lib/stemmaweb/Controller/Relation.pm @@ -441,11 +441,13 @@ sub merge :Chained('text') :PathPart :Args(0) { $response = { status => 'error', error => $errmsg }; } else { $response = { status => 'ok' }; - my @identical = $collation->identical_readings( - start => $main, end => $csucc->id ); - if( @identical ) { - $response->{'checkalign'} = [ - map { [ $_->[0]->id, $_->[1]->id ] } @identical ]; + unless( $c->request->param('single') ) { + my @identical = $collation->identical_readings( + start => $main, end => $csucc->id ); + if( @identical ) { + $response->{'checkalign'} = [ + map { [ $_->[0]->id, $_->[1]->id ] } @identical ]; + } } $m->save( $collation ); }