From 0c5bf5eef9f854804d9a8548d436c0618d2b0458 Mon Sep 17 00:00:00 2001 From: Dominic Canora Date: Fri, 29 Sep 2023 01:52:05 +0000 Subject: [PATCH] Check if category exists using externalid instead of name --- webapp/src/DataFixtures/DefaultData/TeamCategoryFixture.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/DataFixtures/DefaultData/TeamCategoryFixture.php b/webapp/src/DataFixtures/DefaultData/TeamCategoryFixture.php index 106452f339..630ba2f216 100644 --- a/webapp/src/DataFixtures/DefaultData/TeamCategoryFixture.php +++ b/webapp/src/DataFixtures/DefaultData/TeamCategoryFixture.php @@ -23,7 +23,7 @@ public function load(ObjectManager $manager): void ]; foreach ($data as $item) { - if (!($category = $manager->getRepository(TeamCategory::class)->findOneBy(['name' => $item[0]]))) { + if (!($category = $manager->getRepository(TeamCategory::class)->findOneBy(['externalid' => $item[4]]))) { $category = (new TeamCategory()) ->setName($item[0]) ->setSortorder($item[1])