Import objects cannot be deleted when in COMPLETE state

Description

Trying to remove a COMPLETED import using the REST interface will fail if the import has tasks.

Example, this is not working
curl -X DELETE https://server.com/geoserver/rest/imports/12

Removing the tasks will allow the import object to be removed.

This works:
curl -X DELETE https://server.com/geoserver/rest/imports/12/tasks/0
curl -X DELETE https://server.com/geoserver/rest/imports/12

No message appear in the log

Environment

None

Status

Assignee

Andrea Aime

Reporter

Gnafu

Triage

None

Fix versions

Affects versions

2.14-RC

Components

Priority

Medium
Configure