dbmsv4 init...5

This commit is contained in:
최준흠 2026-02-04 11:26:50 +09:00
parent fa39511b13
commit e7d439b1cf
2 changed files with 7 additions and 5 deletions

View File

@ -81,7 +81,8 @@ class ServerEntity extends EquipmentEntity
}
public function getIP(): ?string
{
return $this->ip ?? null;
$val = $this->ip ?? null;
return ($val === '' || $val === null) ? null : $val;
}
public function getViewer(): ?string
@ -103,6 +104,7 @@ class ServerEntity extends EquipmentEntity
}
public function getFormatAt(): ?string
{
return $this->format_at ?? null;
$val = $this->format_at ?? null;
return ($val === '' || $val === null) ? null : $val;
}
}

View File

@ -167,7 +167,7 @@ class ServerService extends EquipmentService
//기존 IP 제거
service('part_ipservice')->detachFromServer($oldEntity);
//새로운 IP 추가 (IP가 정의 되어 있으면)
if ($entity->getIP()) {
if ($entity->getIP() !== null) {
service('part_ipservice')->attachToServer($entity);
}
}
@ -175,7 +175,7 @@ class ServerService extends EquipmentService
if ($oldEntity->getSwitchInfoUid() !== $entity->getSwitchInfoUid()) {
service('part_switchservice')->detachFromServer($oldEntity);
//새로운 Switch 추가 (Switch가 정의 되어 있으면)
if ($entity->getSwitchInfoUid()) {
if ($entity->getSwitchInfoUid() !== null) {
service('part_switchservice')->attachToServer($entity);
}
}
@ -183,7 +183,7 @@ class ServerService extends EquipmentService
if ($oldEntity->getChassisInfoUid() !== $entity->getChassisInfoUid()) {
service('equipment_chassisservice')->detachFromServer($oldEntity);
//새로운 Chassis 추가 (Chassis가 정의 되어 있으면)
if ($entity->getChassisInfoUid()) {
if ($entity->getChassisInfoUid() !== null) {
service('equipment_chassisservice')->attachToServer($entity);
}
}