Remove transactional for delete tenant since it conflicts with the cache implementation

This commit is contained in:
Andrii Shvaika 2022-07-12 19:51:25 +03:00
parent 2e852ed7f2
commit 7fa1ca365b
2 changed files with 1 additions and 2 deletions

View File

@ -126,7 +126,7 @@ public class DeviceProfileDataValidator extends AbstractHasOtaPackageValidator<D
throw new DataValidationException("Another default device profile is present in scope of current tenant!");
}
}
if (deviceProfile.getDefaultQueueName() != null) {
if (StringUtils.isNotEmpty(deviceProfile.getDefaultQueueName())) {
Queue queue = queueService.findQueueByTenantIdAndName(tenantId, deviceProfile.getDefaultQueueName());
if (queue == null) {
throw new DataValidationException("Device profile is referencing to non-existent queue!");

View File

@ -171,7 +171,6 @@ public class TenantServiceImpl extends AbstractCachedEntityService<TenantId, Ten
}
@Override
@Transactional(timeout = 60 * 60)
public void deleteTenant(TenantId tenantId) {
log.trace("Executing deleteTenant [{}]", tenantId);
Validator.validateId(tenantId, INCORRECT_TENANT_ID + tenantId);