Check credentials type for null when saving
This commit is contained in:
parent
70f8a29273
commit
3f5e77abb7
@ -81,6 +81,9 @@ public class DeviceCredentialsServiceImpl extends AbstractEntityService implemen
|
||||
}
|
||||
|
||||
private DeviceCredentials saveOrUpdate(TenantId tenantId, DeviceCredentials deviceCredentials) {
|
||||
if (deviceCredentials.getCredentialsType() == null) {
|
||||
throw new DataValidationException("Device credentials type should be specified");
|
||||
}
|
||||
formatCredentials(deviceCredentials);
|
||||
log.trace("Executing updateDeviceCredentials [{}]", deviceCredentials);
|
||||
credentialsValidator.validate(deviceCredentials, id -> tenantId);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user