devel 1.9.3 #126
|
|
@ -1,5 +1,10 @@
|
|||
# Changelog
|
||||
|
||||
## [1.9.3] - 2026-07-31
|
||||
|
||||
### Fixed
|
||||
- Actualización de imagen (`CreateImageAction`): Resuelto error 500 (`Call to a member function getRepository() on null`) al actualizar una imagen existente desde un cliente distinto al que se usó para crearla originalmente. Ahora se utiliza correctamente el cliente enviado en el payload para determinar el repositorio de destino.
|
||||
|
||||
## [1.9.2] - 2026-07-23
|
||||
|
||||
### Added
|
||||
|
|
|
|||
|
|
@ -63,8 +63,10 @@ class CreateImageAction extends AbstractOgAgentController
|
|||
$partitionInfo = json_decode($image->getPartitionInfo(), true);
|
||||
}
|
||||
|
||||
$effectiveClient = $client ?? $image->getClient();
|
||||
|
||||
if ($image->getType() === 'monolithic') {
|
||||
$repository = $image->getClient()->getRepository();
|
||||
$repository = $effectiveClient->getRepository();
|
||||
$latestImageRepo = $this->entityManager->getRepository(ImageImageRepository::class)->findLatestVersionByImageAndRepository($image, $repository);
|
||||
|
||||
$imageImageRepository = new ImageImageRepository();
|
||||
|
|
@ -77,11 +79,11 @@ class CreateImageAction extends AbstractOgAgentController
|
|||
|
||||
$this->entityManager->persist($imageImageRepository);
|
||||
|
||||
return $this->createMonolithicImage($imageImageRepository, $partitionInfo, $image, $repository, $client, $queue, $existingTrace);
|
||||
return $this->createMonolithicImage($imageImageRepository, $partitionInfo, $image, $repository, $effectiveClient, $queue, $existingTrace);
|
||||
} else {
|
||||
$repository = $image->getClient()->getRepository();
|
||||
$repository = $effectiveClient->getRepository();
|
||||
|
||||
return $this->createGitImage($image, $partitionInfo, $repository, $queue, $gitRepositoryName, $existingTrace);
|
||||
return $this->createGitImage($image, $partitionInfo, $repository, $effectiveClient, $queue, $gitRepositoryName, $existingTrace);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -237,6 +239,7 @@ class CreateImageAction extends AbstractOgAgentController
|
|||
Image $image,
|
||||
array $partitionInfo,
|
||||
ImageRepository $repository,
|
||||
?Client $client = null,
|
||||
bool $queue = false,
|
||||
?string $gitRepositoryName = null,
|
||||
?Trace $existingTrace = null
|
||||
|
|
@ -246,7 +249,7 @@ class CreateImageAction extends AbstractOgAgentController
|
|||
throw new BadRequestHttpException('Missing required partition information');
|
||||
}
|
||||
|
||||
$client = $image->getClient();
|
||||
$client = $client ?? $image->getClient();
|
||||
if (!$client->getIp() || !$client->getToken()) {
|
||||
throw new BadRequestHttpException('Client IP or token is missing');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue