From d0253a7fc01957659794fabcf4702f2887b0a0ba Mon Sep 17 00:00:00 2001 From: yubaolee Date: Thu, 9 Dec 2021 00:42:10 +0800 Subject: [PATCH] fix issue #I4GZ61 --- OpenAuth.App/OrgManager/OrgManagerApp.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/OpenAuth.App/OrgManager/OrgManagerApp.cs b/OpenAuth.App/OrgManager/OrgManagerApp.cs index 13789dc4..4b40bb1f 100644 --- a/OpenAuth.App/OrgManager/OrgManagerApp.cs +++ b/OpenAuth.App/OrgManager/OrgManagerApp.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.Linq; using Infrastructure; using OpenAuth.App.Interface; @@ -49,6 +50,10 @@ namespace OpenAuth.App public string Update(Org org) { + if (org.Id == org.ParentId) + { + throw new Exception("上级节点不能为自己"); + } UpdateTreeObj(org); return org.Id;