base url can be altered only if existing is null or empty
This commit is contained in:
parent
aeca9ce38b
commit
63b99ea68e
|
@ -656,6 +656,12 @@ public class RepositoryServiceImpl implements RepositoryService {
|
|||
String desiredCompatibilityLevel) throws Exception {
|
||||
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
|
||||
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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue