Closes #2555 - Fix deleteClassification
This commit is contained in:
parent
26e3c80f47
commit
f4bd23bac2
|
@ -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();
|
||||||
|
|
|
@ -191,7 +191,7 @@ public class ClassificationController {
|
||||||
* @throws NotAuthorizedException if the user is not authorized to delete a Classification
|
* @throws NotAuthorizedException if the user is not authorized to delete a Classification
|
||||||
*/
|
*/
|
||||||
@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 String classificationId)
|
@PathVariable String classificationId)
|
||||||
throws ClassificationNotFoundException, ClassificationInUseException, NotAuthorizedException {
|
throws ClassificationNotFoundException, ClassificationInUseException, NotAuthorizedException {
|
||||||
|
|
Loading…
Reference in New Issue