Skip to content

Commit

Permalink
MID-8300: fix for edit user with archetype
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Nov 23, 2022
1 parent c06594f commit 85a45fe
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,13 @@ protected void initLayout() {
Fragment templateFragment = createTemplateFragment();
add(templateFragment);
} else {
Collection<CompiledObjectCollectionView> allApplicableArchetypeViews = findAllApplicableArchetypeViews();
if (allApplicableArchetypeViews.size() == 1) {
CompiledObjectCollectionView view = allApplicableArchetypeViews.iterator().next();
if (!view.isDefaultView()) {
applyTemplate(allApplicableArchetypeViews.iterator().next());
if (isAdd()) {
Collection<CompiledObjectCollectionView> allApplicableArchetypeViews = findAllApplicableArchetypeViews();
if (allApplicableArchetypeViews.size() == 1) {
CompiledObjectCollectionView view = allApplicableArchetypeViews.iterator().next();
if (!view.isDefaultView()) {
applyTemplate(allApplicableArchetypeViews.iterator().next());
}
}
}
super.initLayout();
Expand Down

0 comments on commit 85a45fe

Please sign in to comment.