From 7d17fab113a51294242633a5ba9c5eeed55de194 Mon Sep 17 00:00:00 2001 From: supercjj2023 Date: Tue, 23 Sep 2025 15:17:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B1=E4=BA=8Euserid=E4=B8=BANULL=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=AF=B9=E8=B1=A1=E5=B1=9E=E6=80=A7=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppApi/ObjectTypeApiController.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Learun.Application.Web/AppApi/ObjectTypeApiController.cs b/Learun.Application.Web/AppApi/ObjectTypeApiController.cs index 8fe7effb..7aa15d4a 100644 --- a/Learun.Application.Web/AppApi/ObjectTypeApiController.cs +++ b/Learun.Application.Web/AppApi/ObjectTypeApiController.cs @@ -631,10 +631,17 @@ namespace Learun.Application.Web.AppApi //每个位号的属性信息 foreach (var tag in objectType.tags) { - if (userDict.TryGetValue(tag.CreateUserID, out string createUserName)) + if (!string.IsNullOrEmpty(tag.CreateUserID)) { - tag.CreateUserName = createUserName;// allUser.FirstOrDefault(x => x.F_UserId == item.CreateUserID)?.F_RealName; + if (userDict.TryGetValue(tag.CreateUserID, out string createUserName)) + { + tag.CreateUserName = createUserName;// allUser.FirstOrDefault(x => x.F_UserId == item.CreateUserID)?.F_RealName; + } + } + else + { + tag.CreateUserName = string.Empty; } tag.EngineDataProperty = tagPropDictByTag[tag.EngineDataID];// tagPropAll.Where(x => x.EngineDataID == tag.EngineDataID).ToList();