mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
fix creating a new AccompanyingPeriodWorkEvaluationDocument when replacing the document (the workflow was lost)
This commit is contained in:
@@ -35,6 +35,6 @@ final class AccompanyingPeriodOriginNormalizer implements NormalizerInterface
|
||||
|
||||
public function supportsNormalization($data, $format = null): bool
|
||||
{
|
||||
return $data instanceof Origin && $format === 'json';
|
||||
return $data instanceof Origin && 'json' === $format;
|
||||
}
|
||||
}
|
||||
|
@@ -13,8 +13,6 @@ namespace Chill\PersonBundle\Serializer\Normalizer;
|
||||
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluation;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument;
|
||||
use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkRepository;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
use Symfony\Component\Serializer\Normalizer\ContextAwareDenormalizerInterface;
|
||||
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
|
||||
@@ -35,18 +33,6 @@ class AccompanyingPeriodWorkEvaluationDenormalizer implements ContextAwareDenorm
|
||||
|
||||
use ObjectToPopulateTrait;
|
||||
|
||||
private EntityManagerInterface $em;
|
||||
|
||||
private AccompanyingPeriodWorkRepository $workRepository;
|
||||
|
||||
public function __construct(
|
||||
AccompanyingPeriodWorkRepository $workRepository,
|
||||
EntityManagerInterface $em
|
||||
) {
|
||||
$this->workRepository = $workRepository;
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
public function denormalize($data, $type, $format = null, array $context = [])
|
||||
{
|
||||
$evaluation = $this->denormalizer->denormalize($data, $type, $format, array_merge(
|
||||
|
Reference in New Issue
Block a user