Add logic to handle update process tenant on TbTenantService

This commit is contained in:
Andrii Landiak 2024-01-12 09:47:01 +02:00
parent eda943dcfb
commit 964fb16f71
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ public class DefaultTbTenantService extends AbstractTbEntityService implements T
boolean created = tenant.getId() == null;
Tenant oldTenant = !created ? tenantService.findTenantById(tenant.getId()) : null;
Tenant savedTenant = checkNotNull(tenantService.saveTenant(tenant, false));
Tenant savedTenant = checkNotNull(tenantService.saveTenant(tenant, !created));
if (created) {
installScripts.createDefaultRuleChains(savedTenant.getId());
installScripts.createDefaultEdgeRuleChains(savedTenant.getId());

View File

@ -49,10 +49,10 @@ public interface DeviceService extends EntityDaoService {
Device findDeviceByTenantIdAndName(TenantId tenantId, String name);
Device saveDevice(Device device, boolean doValidate);
Device saveDevice(Device device);
Device saveDevice(Device device, boolean doValidate);
Device saveDeviceWithAccessToken(Device device, String accessToken);
Device saveDeviceWithCredentials(Device device, DeviceCredentials deviceCredentials);