Skip to content

Commit

Permalink
Check if category exists using externalid instead of name
Browse files Browse the repository at this point in the history
  • Loading branch information
dc74089 authored and nickygerritsen committed Sep 29, 2023
1 parent a12c260 commit 0c5bf5e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 0c5bf5e

Please sign in to comment.