Fixed rs deletion.
This commit is contained in:
parent
f67be6e3ee
commit
9cb074b2ec
|
@ -45,6 +45,7 @@ public class RailSystemService {
|
||||||
.orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND));
|
.orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND));
|
||||||
componentRepository.deleteAllByRailSystem(rs);
|
componentRepository.deleteAllByRailSystem(rs);
|
||||||
segmentRepository.deleteAllByRailSystem(rs);
|
segmentRepository.deleteAllByRailSystem(rs);
|
||||||
|
rs.setSettings(null);
|
||||||
railSystemRepository.delete(rs);
|
railSystemRepository.delete(rs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue