Permalink
Browse files

don't add if it's already there

  • Loading branch information...
1 parent 6441d1d commit 28b83a213012d139bab2cdb51f0f46598a884f8e @yanick committed Dec 14, 2010
Showing with 2 additions and 1 deletion.
  1. +2 −1 script/populate_blog.pl
@@ -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;
}
}

0 comments on commit 28b83a2

Please sign in to comment.