Clear all the tags before adding them again.

Fixes #4
This commit is contained in:
Tim Schumacher 2014-07-28 22:11:55 +02:00
parent 4eb53a8ceb
commit 51af913608

View file

@ -247,6 +247,7 @@ class EventController extends Controller
$tags = explode(',', $tags);
$em = $this->getDoctrine()->getManager();
$repo = $em->getRepository('CalciferBundle:Tag');
$entity->clearTags();
foreach ($tags as $tag) {
$tag = trim($tag);
$results = $repo->findBy(['name' => $tag]);