PathElement::Tag: use parents_id when looking up tag
authorIan Beckwith <ianb@erislabs.net>
Sun, 17 Oct 2010 06:18:21 +0000 (07:18 +0100)
committerIan Beckwith <ianb@erislabs.net>
Sun, 17 Oct 2010 06:18:21 +0000 (07:18 +0100)
lib/ID3FS/PathElement/Tag.pm

index ad68f06..19c3378 100644 (file)
@@ -13,7 +13,7 @@ sub new
     $self->{db}=shift;
     $self->{name}=shift;
     $self->{parents_id}=shift;
-    $self->{id}=$self->{db}->lookup_id("tags", $self->{name});
+    $self->{id}=$self->{db}->lookup_id("tags", $self->{name}, $self->{parents_id});
     return(undef) unless(defined($self->{id}));
     return($self);
 }