fix logical error

This commit is contained in:
areeqakbr 2025-06-23 11:12:33 +07:00
parent 512565c49b
commit a115aac9f7
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ func (u *fishboneUseCase) CreateFishbone(fishbone req.FishboneDTO) error {
}
// Validate port availability
if startDevicePort.PortAvailable < 1 {
if startDevicePort.PortAvailable < 1 && startDevice.DeviceType == "ODP" {
return fmt.Errorf("start device has no available ports (available: %d, required: 1)",
startDevicePort.PortAvailable)
}