Closes #2555 - Fix deleteClassification

This commit is contained in:
ryzheboka 2024-04-02 13:04:48 +02:00 committed by Jörg Heffner
parent 281989ddfd
commit d0f5c4196d
2 changed files with 2 additions and 1 deletions

View File

@ -154,6 +154,7 @@ public class ClassificationServiceImpl implements ClassificationService {
if (isReferentialIntegrityConstraintViolation(e)) { if (isReferentialIntegrityConstraintViolation(e)) {
throw new ClassificationInUseException(classification, e); throw new ClassificationInUseException(classification, e);
} }
throw e;
} }
} finally { } finally {
taskanaEngine.returnConnection(); taskanaEngine.returnConnection();

View File

@ -334,7 +334,7 @@ public class ClassificationController {
content = {@Content(schema = @Schema())}) content = {@Content(schema = @Schema())})
}) })
@DeleteMapping(path = RestEndpoints.URL_CLASSIFICATIONS_ID) @DeleteMapping(path = RestEndpoints.URL_CLASSIFICATIONS_ID)
@Transactional(readOnly = true, rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public ResponseEntity<ClassificationRepresentationModel> deleteClassification( public ResponseEntity<ClassificationRepresentationModel> deleteClassification(
@PathVariable("classificationId") String classificationId) @PathVariable("classificationId") String classificationId)
throws ClassificationNotFoundException, ClassificationInUseException, NotAuthorizedException { throws ClassificationNotFoundException, ClassificationInUseException, NotAuthorizedException {