tenant config bug fix

This commit is contained in:
Efstratios Giannopoulos 2024-05-24 11:16:45 +03:00
parent fc239514e9
commit bd966282c7
1 changed files with 2 additions and 2 deletions

View File

@ -144,8 +144,8 @@ public class TenantConfigurationServiceImpl implements TenantConfigurationServic
}
TenantConfigurationQuery tenantConfigurationQuery = this.queryFactory.query(TenantConfigurationQuery.class).disableTracking().excludedIds(data.getId()).isActive(IsActive.Active).types(data.getType());
if (data.getTenantId() == null) tenantConfigurationQuery.tenantIsSet(false);
else tenantConfigurationQuery.tenantIsSet(true).tenantIds(data.getTenantId());
if (this.tenantScope.isDefaultTenant()) tenantConfigurationQuery.tenantIsSet(false);
else tenantConfigurationQuery.tenantIsSet(true).tenantIds(this.tenantScope.getTenant());
if (tenantConfigurationQuery.count() > 0)throw new MyValidationException(this.errors.getMultipleTenantConfigurationTypeNotAllowed().getCode(), this.errors.getMultipleTenantConfigurationTypeNotAllowed().getMessage());
switch (data.getType()){