| | |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.COMPANY_NOT_URL)); |
| | | }*/ |
| | | CompanyField companyField; |
| | | if(id == null){ |
| | | companyField = this.companyFieldRepository.findByUrl(url); |
| | | } else { |
| | | companyField = this.companyFieldRepository.findByUrlAndIdNot(url,id); |
| | | } |
| | | if (!StringUtils.isEmpty(url)) { |
| | | CompanyField companyField; |
| | | if(id == null){ |
| | | companyField = this.companyFieldRepository.findByUrl(url); |
| | | } else { |
| | | companyField = this.companyFieldRepository.findByUrlAndIdNot(url,id); |
| | | } |
| | | |
| | | if (companyField != null) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.COMPANY_USED_URL)); |
| | | if (companyField != null) { |
| | | throw new OwlRuntimeException( |
| | | this.messageAccessor.getMessage(MsgConstants.COMPANY_USED_URL)); |
| | | } |
| | | } |
| | | } |
| | | |