a fix in editCache
This commit is contained in:
parent
c1dcba7c04
commit
30cb1d1579
@ -171,8 +171,10 @@ public class CacheConstructionUtil {
|
|||||||
|
|
||||||
for (Cache cache1 : cacheRepository.findAll()) {
|
for (Cache cache1 : cacheRepository.findAll()) {
|
||||||
if (cache1.getName().equals(cache.getName())) {
|
if (cache1.getName().equals(cache.getName())) {
|
||||||
deleteNewCreatedStationsUtil(newCreatedStationList);
|
if (cache1 != oldCache) {
|
||||||
return ResponseEntity.status(400).body("name is already taken");
|
deleteNewCreatedStationsUtil(newCreatedStationList);
|
||||||
|
return ResponseEntity.status(400).body("name is already taken");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user