|
|
|
@ -376,6 +376,7 @@ public class DeviceProfileServiceImpl extends AbstractEntityService implements D |
|
|
|
throw new DataValidationException("Device profile should be assigned to tenant!"); |
|
|
|
} else { |
|
|
|
Tenant tenant = tenantService.findTenantById(deviceProfile.getTenantId()); |
|
|
|
// TODO: 13.01.22 Instead of finding and checking for null need to create and use tenantService.exists()
|
|
|
|
if (tenant == null) { |
|
|
|
throw new DataValidationException("Device profile is referencing to non-existent tenant!"); |
|
|
|
} |
|
|
|
|