a fix in editCache

This commit is contained in:
Michael 2019-05-13 15:41:13 +02:00
parent c1dcba7c04
commit 30cb1d1579

View File

@ -171,8 +171,10 @@ public class CacheConstructionUtil {
for (Cache cache1 : cacheRepository.findAll()) {
if (cache1.getName().equals(cache.getName())) {
deleteNewCreatedStationsUtil(newCreatedStationList);
return ResponseEntity.status(400).body("name is already taken");
if (cache1 != oldCache) {
deleteNewCreatedStationsUtil(newCreatedStationList);
return ResponseEntity.status(400).body("name is already taken");
}
}
}