base url can be altered only if existing is null or empty
This commit is contained in:
parent
7b7c6b0842
commit
ab03a5164d
|
@ -656,6 +656,12 @@ public class RepositoryServiceImpl implements RepositoryService {
|
||||||
String desiredCompatibilityLevel) throws Exception {
|
String desiredCompatibilityLevel) throws Exception {
|
||||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||||
Repository repository = this.getRepositoryById(repoId);
|
Repository repository = this.getRepositoryById(repoId);
|
||||||
|
if (repositoryInterface.getId() != null) {
|
||||||
|
RepositoryInterface existing = getRepositoryInterface(repoId).stream().filter(iFace -> iFace.getId().equals(repositoryInterface.getId())).findFirst().orElse(null);
|
||||||
|
if (existing != null && (existing.getBaseurl() == null || "".equals(existing.getBaseurl()))) {
|
||||||
|
this.updateBaseUrl(repoId, repositoryInterface.getId(), repositoryInterface.getBaseurl());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.updateValidationSet(repoId, repositoryInterface.getId(), repositoryInterface.getAccessSet());
|
this.updateValidationSet(repoId, repositoryInterface.getId(), repositoryInterface.getAccessSet());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue