Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(candeletecardinalities): return correct response on route negative case (DEV-36) #1910

Merged
merged 9 commits into from Sep 29, 2021
Expand Up @@ -129,9 +129,6 @@ object Cardinalities {

submittedPropertyToDelete: SmartIri = cardinalitiesToDelete.head._1
propertyIsUsed: Boolean <- isPropertyUsedInResources(settings, storeManager, submittedPropertyToDelete)
_ = if (propertyIsUsed) {
throw BadRequestException("Property is used in data. The cardinality cannot be deleted.")
}

// Make an update class definition in which the cardinality to delete is removed

Expand Down Expand Up @@ -170,7 +167,7 @@ object Cardinalities {
throw BadRequestException(msg)
}
)
} yield CanDoResponseV2(true)
} yield CanDoResponseV2(!propertyIsUsed)
}

/**
Expand Down