Merge pull request 'feature/responses-v2' (#29) from feature/responses-v2 into dev

Reviewed-on: winter-access/backend_nam#29
This commit is contained in:
areeqakbr 2025-06-23 04:23:20 +00:00
commit dd90547309
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ func (u *backboneUseCase) CreateBackbone(backbone req.BackboneDTO) error {
}
// Validate port availability - each backbone uses 1 port regardless of core amount
if startDevicePort.PortAvailable < 1 {
if startDevicePort.PortAvailable < 1 && startDevice.DeviceType == "OTB" {
return fmt.Errorf("start device has no available ports (available: %d, required: 1)",
startDevicePort.PortAvailable)
}

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)
}