Fix bug around lazy loading packages

This commit is contained in:
Grahame Grieve 2022-07-22 07:57:34 +10:00
parent 49cf36cc50
commit 83bfb07d0e
1 changed files with 2 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import org.hl7.fhir.r5.context.IWorkerContext.ICanonicalResourceLocator;
import org.hl7.fhir.r5.elementmodel.Element;
import org.hl7.fhir.r5.model.CanonicalResource;
import org.hl7.fhir.r5.model.ElementDefinition;
import org.hl7.fhir.r5.model.Resource;
import org.hl7.fhir.r5.model.StructureDefinition;
import org.hl7.fhir.r5.model.ValueSet;
import org.hl7.fhir.r5.terminologies.TerminologyClient;
@ -152,7 +153,7 @@ public class StandAloneValidatorFetcher implements IValidatorResourceFetcher, IV
}
if (pi != null) {
context.loadFromPackage(pi, null);
return pi.hasCanonical(url);
return pi.hasCanonical(url) || context.fetchResource(Resource.class, url) != null;
}
}