Corregida migracion de perfiles hardware y software, los tipos de software y hardware no se guardaban en base de datos antes de tener que ser usados por los perfiles
testing/ogcore-api/pipeline/head There was a failure building this commit Details

pull/117/head
Juan Manuel Bardallo 2026-05-14 14:42:16 +02:00
parent fb6e3c0e53
commit 2ac9d27d97
4 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## [1.7.12] - 2026-05-14
### Fixed
- Corregida migracion de perfiles hardware y software, los tipos de software y hardware no se guardaban en base de datos antes de tener que ser usados por los perfiles.
## [1.7.11] - 2026-05-14
### Fixed
- Corregido error "Call to undefined method App\Entity\Image::setRemotePc()" al importar una imagen desde un repositorio. La propiedad `remotePc` fue eliminada de la entidad `Image` en la versión 1.7.0 pero la llamada a `setRemotePc()` no fue eliminada del controlador `ImportAction`.

View File

@ -59,6 +59,7 @@ class MigrateHardwareAndHardwareProfileCommand extends Command
$this->entityManager->persist($hardwareProfileEntity);
}
$this->entityManager->flush();
/** Obtener los hardware de la base de datos antigua **/
$rsmHardware = new ResultSetMapping();
@ -97,6 +98,7 @@ class MigrateHardwareAndHardwareProfileCommand extends Command
$this->entityManager->persist($hardwareEntity);
}
$this->entityManager->flush();
/**
* In OpenGnsys 2.0, HardwareProfile is linked OneToOne with Client and is mandatory.

View File

@ -73,6 +73,7 @@ class MigrateSoftwareAndSoftwareProfileCommand extends Command
$this->entityManager->persist($softwareEntity);
}
$this->entityManager->flush();
/** Obtener los perfiles software de la base de datos antigua **/
$rsmSoftwareProfiles = new ResultSetMapping();
@ -104,6 +105,7 @@ class MigrateSoftwareAndSoftwareProfileCommand extends Command
$this->entityManager->persist($softwareProfileEntity);
}
$this->entityManager->flush();
/** Obtener los software, y asignarselos a los perfiles software **/
$rsmSoftwareProfilesRelation = new ResultSetMapping();

View File

@ -51,7 +51,7 @@ final class HardwareOutput extends AbstractOutput
$this->name = $hardware->getName();
$this->description = $hardware->getDescription();
$this->type = new HardwareTypeOutput($hardware->getType());
$this->type = $hardware->getType() ? new HardwareTypeOutput($hardware->getType()) : null;
$this->createdAt = $hardware->getCreatedAt();
$this->createdBy = $hardware->getCreatedBy();
}