From c09017455a7c73acb825b5a6c703492d83875669 Mon Sep 17 00:00:00 2001 From: youngq Date: Mon, 14 Oct 2024 16:49:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WGShare.API/Controllers/Frontend/UserController.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WGShare.API/Controllers/Frontend/UserController.cs b/WGShare.API/Controllers/Frontend/UserController.cs index fe48d11..f0fa8eb 100644 --- a/WGShare.API/Controllers/Frontend/UserController.cs +++ b/WGShare.API/Controllers/Frontend/UserController.cs @@ -231,7 +231,9 @@ namespace WGShare.API.Controllers.Frontend else if (x.RoleId == "房间管理员") roleId = "3"; x.RoleId = roleId; - x.Subject = x.SubjectName.GetEnumValueFromDescription(); + + if (string.IsNullOrWhiteSpace(x.SubjectName)) + x.Subject = SubjectType.All; }); await _sqlSugar.Insertable(users).ExecuteCommandAsync();