This commit is contained in:
Jimmy Deng 2021-09-22 12:52:28 -04:00
parent 26ac649946
commit f9796b9e2a
1 changed files with 1 additions and 1 deletions

View File

@ -586,7 +586,7 @@ public abstract class BaseHapiFhirResourceDao<T extends IBaseResource> extends B
throw new MethodNotAllowedException("_expunge is not enabled on this server: " + getConfig().cannotDeleteExpungeReason());
}
if (theUrl.contains(Constants.PARAMETER_CASCADE_DELETE) || theRequest.getHeader(Constants.HEADER_CASCADE).equals(Constants.CASCADE_DELETE)) {
if (theUrl.contains(Constants.PARAMETER_CASCADE_DELETE) || (theRequest.getHeader(Constants.HEADER_CASCADE) != null && theRequest.getHeader(Constants.HEADER_CASCADE).equals(Constants.CASCADE_DELETE))) {
throw new InvalidRequestException("_expunge cannot be used with _cascade");
}