Fixed rs deletion.

This commit is contained in:
Andrew Lalis 2022-05-31 09:25:53 +02:00
parent f67be6e3ee
commit 9cb074b2ec
1 changed files with 1 additions and 0 deletions

View File

@ -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);
} }