dev_id can null for internal towers

This commit is contained in:
areeqakbr 2025-06-19 19:39:53 +07:00
parent e35edf3172
commit 8edbdfaa56
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 {