From 896ae65606405025e2d6e636aee36fc47527ec4c Mon Sep 17 00:00:00 2001
From: Jeremy Guiselin <jeremy.guiselin@student.ecp.fr>
Date: Sat, 11 Feb 2017 12:25:44 -0500
Subject: [PATCH] fix notification + remove unique league

---
 src/BackendBundle/Controller/NotificationController.php | 3 ++-
 src/BackendBundle/Repository/LeagueRepository.php       | 4 +---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/BackendBundle/Controller/NotificationController.php b/src/BackendBundle/Controller/NotificationController.php
index 78c1666..40f441b 100644
--- a/src/BackendBundle/Controller/NotificationController.php
+++ b/src/BackendBundle/Controller/NotificationController.php
@@ -135,7 +135,8 @@ class NotificationController extends Controller
             [
                 'elements' => $pagination,
                 'countPages' => $pagesCount,
-                'page' => $page
+                'page' => $page,
+                'name' => 'notification'
             ]
         );
     }
diff --git a/src/BackendBundle/Repository/LeagueRepository.php b/src/BackendBundle/Repository/LeagueRepository.php
index fe773ca..db7961c 100644
--- a/src/BackendBundle/Repository/LeagueRepository.php
+++ b/src/BackendBundle/Repository/LeagueRepository.php
@@ -21,9 +21,7 @@ class LeagueRepository extends EntityRepository
      */
     public function alreadyExists(League $league): bool
     {
-        return $this->findOneBy([
-            'name' => $league->getName()
-        ]) !== null;
+        return false;
     }
 
     public function findBySport(string $sport, Device $device)
-- 
GitLab