check for relationship before collating
[scpubgit/stemmatology.git] / lib / Text / Tradition / Collation / RelationshipStore.pm
index 314d003..3024f20 100644 (file)
@@ -605,7 +605,8 @@ sub filter_collations {
                        $c->relations->_drop_collations( "$rdg" );
                }
                $anchor
-                       ? map { $c->add_relationship( $anchor, $_, { 'type' => 'collated' } ) } @need_collations
+                       ? map { $c->add_relationship( $anchor, $_, { 'type' => 'collated' } )
+                                               unless $c->get_relationship( $anchor, $_ ) } @need_collations
                        : warn "No anchor found at $r";
        }
 }