pull/26/head
parent
dc9e21b61e
commit
350dcd1d24
|
@ -64,6 +64,12 @@ class ImportAction extends AbstractOgRepositoryController
|
|||
$this->entityManager->persist($imageEntity);
|
||||
}
|
||||
|
||||
$imageImageRepositoryEntity = $this->entityManager->getRepository(ImageImageRepository::class)->findOneBy(['image' => $imageEntity, 'repository' => $repository]);
|
||||
|
||||
if ($imageImageRepositoryEntity){
|
||||
throw new ValidatorException('This image already exists in this repository');
|
||||
}
|
||||
|
||||
$imageImageRepositoryEntity = new ImageImageRepository();
|
||||
$imageImageRepositoryEntity->setStatus(ImageStatus::AUX_FILES_PENDING);
|
||||
$imageImageRepositoryEntity->setImage($imageEntity);
|
||||
|
|
Loading…
Reference in New Issue