Skip to content

Commit

Permalink
don't add if it's already there
Browse files Browse the repository at this point in the history
  • Loading branch information
yanick committed Dec 14, 2010
1 parent 6441d1d commit 28b83a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion script/populate_blog.pl
Expand Up @@ -116,7 +116,8 @@ sub import_entry {
$entry->insert;

for ( @{ $header->{tags} } ) {
$entry->add_to_tags( { label => $_ } ) unless $entry->tags({label => $_ })->find;
$entry->add_to_tags( { label => $_ } ) unless $entry->tags({label =>
$_ })->search->count > 0;
}

}
Expand Down

0 comments on commit 28b83a2

Please sign in to comment.