From: Tara L Andrews Date: Fri, 20 Apr 2012 17:13:35 +0000 (+0200) Subject: check for relationship before collating X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=46e1fe146d07f8325d488278a41dac4697539651;p=scpubgit%2Fstemmatology.git check for relationship before collating --- diff --git a/lib/Text/Tradition/Collation/RelationshipStore.pm b/lib/Text/Tradition/Collation/RelationshipStore.pm index 314d003..3024f20 100644 --- a/lib/Text/Tradition/Collation/RelationshipStore.pm +++ b/lib/Text/Tradition/Collation/RelationshipStore.pm @@ -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"; } }