We shouldn't allow the user to delete disaggregation types if there are disaggregation labels, otherwise, the object will lose the connection with the indicator and will a useless data. The same will happen with disaggregation values if we delete the labels. We'd lose the connection and the data won't have sense.
Approach
Added protect deletion to follow the rules:
The users are allowed to delete types if there are no labels.
The users are allowed to delete labels if there are no values.
Purpose
We shouldn't allow the user to delete disaggregation types if there are disaggregation labels, otherwise, the object will lose the connection with the indicator and will a useless data. The same will happen with disaggregation values if we delete the labels. We'd lose the connection and the data won't have sense.
Approach
Added protect deletion to follow the rules:
Furter Info
Related ticket: https://github.com/Humanitec/ActivityAPI/issues/261