From 46bea888af5115677360630a4d13d3fbb9c5e813 Mon Sep 17 00:00:00 2001 From: apobekiaris Date: Sun, 20 Feb 2022 16:35:31 +0200 Subject: [PATCH] CloneModelView: Verify the view is not there before creation to support special cases, e.g ModelDifference #908 --- src/Modules/CloneModelView/CloneModelViewService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Modules/CloneModelView/CloneModelViewService.cs b/src/Modules/CloneModelView/CloneModelViewService.cs index e7eaf0965..940c96aca 100644 --- a/src/Modules/CloneModelView/CloneModelViewService.cs +++ b/src/Modules/CloneModelView/CloneModelViewService.cs @@ -68,6 +68,7 @@ static void AssignAsDefaultView(this CloneModelViewAttribute cloneModelViewAttri static void GenerateModel(this IModelViews views, IModelClass classInfo){ var cloneViewAttributes = classInfo.TypeInfo.FindAttributes(false) + .Where(attribute => views[attribute.ViewId]==null) .OrderBy(viewAttribute => viewAttribute.ViewType); foreach (var cloneViewAttribute in cloneViewAttributes){ var modelView = views.NewModelView( cloneViewAttribute, classInfo);