dev_id can null for internal towers
This commit is contained in:
parent
e35edf3172
commit
8edbdfaa56
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in New Issue