Fix for bundle renderer trying to render resources from the wrong version
This commit is contained in:
parent
3687734828
commit
c4a396546a
|
@ -399,4 +399,14 @@ public class BundleRenderer extends ResourceRenderer {
|
|||
return "??";
|
||||
}
|
||||
|
||||
public boolean canRender(Bundle b) {
|
||||
for (BundleEntryComponent be : b.getEntry()) {
|
||||
ResourceRenderer rr = RendererFactory.factory(be.getResource(), context);
|
||||
if (!rr.canRender(be.getResource())) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -939,5 +939,8 @@ public class ProfileDrivenRenderer extends ResourceRenderer {
|
|||
return path.substring(path.lastIndexOf(".")+1);
|
||||
}
|
||||
|
||||
public boolean canRender(Resource resource) {
|
||||
return context.getWorker().getResourceNames().contains(resource.fhirType());
|
||||
}
|
||||
|
||||
}
|
|
@ -366,4 +366,8 @@ public abstract class ResourceRenderer extends DataRenderer {
|
|||
return fullUrl.replace(":", "-");
|
||||
}
|
||||
|
||||
public boolean canRender(Resource resource) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue