Skip to content

Commit

Permalink
Fix category attribut import
Browse files Browse the repository at this point in the history
  • Loading branch information
TheGrimmChester committed Jul 31, 2024
1 parent 433f747 commit f633980
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/Processor/Category/AttributeProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

class AttributeProcessor implements CategoryProcessorInterface
{
private array $taxonAttributes = [];

public static function getDefaultPriority(): int
{
return 700;
Expand Down Expand Up @@ -80,15 +78,9 @@ public function support(TaxonInterface $taxon, array $resource): bool

private function getTaxonAttributes(string $attributeCode, string $type): TaxonAttributeInterface
{
if (array_key_exists($attributeCode, $this->taxonAttributes)) {
return $this->taxonAttributes[$attributeCode];
}

$taxonAttribute = $this->taxonAttributeRepository->findOneBy(['code' => $attributeCode]);

if ($taxonAttribute instanceof TaxonAttribute) {
$this->taxonAttributes[$attributeCode] = $taxonAttribute;

return $taxonAttribute;
}

Expand All @@ -102,7 +94,6 @@ private function getTaxonAttributes(string $attributeCode, string $type): TaxonA
$taxonAttribute->setTranslatable(false);

$this->entityManager->persist($taxonAttribute);
$this->taxonAttributes[$attributeCode] = $taxonAttribute;

return $taxonAttribute;
}
Expand Down

0 comments on commit f633980

Please sign in to comment.