Fixed image name sync
testing/ogcore-api/pipeline/head There was a failure building this commit
Details
testing/ogcore-api/pipeline/head There was a failure building this commit
Details
parent
2b3e0a8350
commit
80948dda38
|
|
@ -93,18 +93,12 @@ class OrganizationalUnitController extends AbstractController
|
|||
->getRepository(ImageImageRepository::class)
|
||||
->findBy(['remotePc' => true]);
|
||||
|
||||
$seen = [];
|
||||
$data = [];
|
||||
|
||||
foreach ($iirs as $iir) {
|
||||
$image = $iir->getImage();
|
||||
if (!$image || isset($seen[$image->getId()])) {
|
||||
continue;
|
||||
}
|
||||
$seen[$image->getId()] = true;
|
||||
$data[] = [
|
||||
'id' => $image->getId(),
|
||||
'name' => $image->getName(),
|
||||
'id' => $iir->getId(),
|
||||
'name' => $iir->getName(),
|
||||
'inremotepc' => true,
|
||||
'ou' => ['id' => $centerId],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ class RemotePcController extends AbstractController
|
|||
{
|
||||
foreach ($client->getPartitions() as $partition) {
|
||||
$iir = $partition->getImage();
|
||||
if ($iir && $iir->getImage() && $iir->getImage()->getId() === $imageId) {
|
||||
if ($iir && $iir->getId() === $imageId) {
|
||||
return $partition;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,11 +174,10 @@ class ClientRepository extends AbstractRepository
|
|||
->join('c.organizationalUnit', 'lab')
|
||||
->join('c.partitions', 'p')
|
||||
->join('p.image', 'iir')
|
||||
->join('iir.image', 'img')
|
||||
->leftJoin('c.remotePC', 'rpc')
|
||||
->where('lab.path LIKE :pathPrefix')
|
||||
->andWhere('lab.remotePc = true')
|
||||
->andWhere('img.id = :imageId')
|
||||
->andWhere('iir.id = :imageId')
|
||||
->andWhere('iir.remotePc = true')
|
||||
->andWhere('c.maintenance = false')
|
||||
->andWhere('(rpc.reservedUntil IS NULL OR rpc.reservedUntil < :now)')
|
||||
|
|
|
|||
|
|
@ -250,7 +250,7 @@ class UDSClient
|
|||
{
|
||||
foreach ($client->getPartitions() as $partition) {
|
||||
$iir = $partition->getImage();
|
||||
if ($iir && $iir->getImage() && $iir->getImage()->getId() === $imageId) {
|
||||
if ($iir && $iir->getId() === $imageId) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue