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()) {
|
||||
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user