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();