Clean up helper method - simplify entity reference creation

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-02-15 17:48:25 +00:00
parent 584966d7ad
commit da456598d1

View file

@ -69,10 +69,9 @@ class PartDataTableHelper
} }
// For DTO, create a Part proxy for URL generation // For DTO, create a Part proxy for URL generation
$partForUrl = $context; $partForUrl = $context instanceof PartDTO
if ($context instanceof PartDTO) { ? $this->entityManager->getReference(Part::class, $context->getId())
$partForUrl = $this->entityManager->getReference(Part::class, $context->getId()); : $context;
}
return sprintf( return sprintf(
'<a href="%s">%s%s</a>', '<a href="%s">%s%s</a>',