Issue #16: look for flag to refrain from sending checkalign suggestions
Tara L Andrews [Thu, 18 Jul 2013 03:32:05 +0000 (05:32 +0200)]
lib/stemmaweb/Controller/Relation.pm

index bfe9d87..ca3a459 100644 (file)
@@ -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 );
                }