aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ImportBundle/Import/PocketImport.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-01-03 10:32:56 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-01-03 10:32:56 +0100
commitc5c7f90a81d7a2082c7b6dad38c2a6dfdba8d016 (patch)
treec56c2b2f7e975939ddb5014e013775143113ba1c /src/Wallabag/ImportBundle/Import/PocketImport.php
parent5b2b5858fe363c1f9203b153166def099ecb5d67 (diff)
downloadwallabag-c5c7f90a81d7a2082c7b6dad38c2a6dfdba8d016.tar.gz
wallabag-c5c7f90a81d7a2082c7b6dad38c2a6dfdba8d016.tar.zst
wallabag-c5c7f90a81d7a2082c7b6dad38c2a6dfdba8d016.zip
Fix tag related test for Pocket
Diffstat (limited to 'src/Wallabag/ImportBundle/Import/PocketImport.php')
-rw-r--r--src/Wallabag/ImportBundle/Import/PocketImport.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php
index b1c5bb00..853ad135 100644
--- a/src/Wallabag/ImportBundle/Import/PocketImport.php
+++ b/src/Wallabag/ImportBundle/Import/PocketImport.php
@@ -184,13 +184,14 @@ class PocketImport implements ImportInterface
184 $label = trim($tag['tag']); 184 $label = trim($tag['tag']);
185 $tagEntity = $this->em 185 $tagEntity = $this->em
186 ->getRepository('WallabagCoreBundle:Tag') 186 ->getRepository('WallabagCoreBundle:Tag')
187 ->findOneByLabelAndUserId($label, $this->user->getId()); 187 ->findOneByLabel($label);
188 188
189 if (is_object($tagEntity)) { 189 if (is_object($tagEntity)) {
190 $entry->addTag($tagEntity); 190 $entry->addTag($tagEntity);
191 } else { 191 } else {
192 $newTag = new Tag($this->user); 192 $newTag = new Tag();
193 $newTag->setLabel($label); 193 $newTag->setLabel($label);
194
194 $entry->addTag($newTag); 195 $entry->addTag($newTag);
195 } 196 }
196 $this->em->flush(); 197 $this->em->flush();