Do not use metadata from data type profiles on elements when generating snapshots

This commit is contained in:
Grahame Grieve 2024-12-02 06:48:02 +03:00
parent 3adbd00209
commit caf5003215
1 changed files with 4 additions and 1 deletions

View File

@ -2450,7 +2450,10 @@ public class ProfileUtilities {
}
}
}
// Before applying changes, apply them to what's in the profile
// but only if it's an extension or a resource
StructureDefinition profile = null;
boolean msg = true;
if (base.hasSliceName()) {
@ -2482,7 +2485,7 @@ public class ProfileUtilities {
msg = false;
}
}
if (profile != null) {
if (profile != null && (profile.getKind() == StructureDefinitionKind.RESOURCE || "Extension".equals(profile.getType()))) {
if (profile.getSnapshot().getElement().isEmpty()) {
throw new DefinitionException(context.formatMessage(I18nConstants.SNAPSHOT_IS_EMPTY, profile.getVersionedUrl()));
}