]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Entity/Entry.php
Add a command to automatically tag all entries for a user
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Entity / Entry.php
index 5aa582f8d434a1c4638ca3127a41d9efe5501cfb..608ed2f0d4ababf41230640cfb45804b137cf687 100644 (file)
@@ -458,6 +458,10 @@ class Entry
      */
     public function addTag(Tag $tag)
     {
+        if ($this->tags->contains($tag)) {
+            return;
+        }
+
         $this->tags[] = $tag;
         $tag->addEntry($this);
     }