Merge pull request 'dev_id can null for internal towers' (#26) from feature/responses-v2 into dev

Reviewed-on: winter-access/backend_nam#26
This commit is contained in:
areeqakbr 2025-06-19 12:40:50 +00:00
commit a601ec7996
1 changed files with 0 additions and 4 deletions

View File

@ -45,10 +45,6 @@ func (u *towerUsecase) PostWithMultipleImages(tower req.TowerDTO, imageFiles []*
return err
}
// Validate that if it's not an external tower, DeviceID must be provided
if tower.ExternalTower != nil && !*tower.ExternalTower && tower.DeviceID == nil {
return fmt.Errorf("device_id is required for internal towers")
}
// Validate that if DeviceID is provided, the device exists
if tower.DeviceID != nil {