diff --git a/src/Passingwind.Abp.ElsaModule.Application.Contracts/Teams/WorkflowTeamRoleScopeDto.cs b/src/Passingwind.Abp.ElsaModule.Application.Contracts/Teams/WorkflowTeamRoleScopeDto.cs index 10a9326..d432597 100644 --- a/src/Passingwind.Abp.ElsaModule.Application.Contracts/Teams/WorkflowTeamRoleScopeDto.cs +++ b/src/Passingwind.Abp.ElsaModule.Application.Contracts/Teams/WorkflowTeamRoleScopeDto.cs @@ -7,5 +7,5 @@ public class WorkflowTeamRoleScopeDto : EntityDto { public string RoleName { get; set; } - public List Values { get; } + public List Values { get; set; } = new List(); } diff --git a/src/Passingwind.Abp.ElsaModule.Application/Teams/WorkflowTeamAppService.cs b/src/Passingwind.Abp.ElsaModule.Application/Teams/WorkflowTeamAppService.cs index 1604f36..2c26730 100644 --- a/src/Passingwind.Abp.ElsaModule.Application/Teams/WorkflowTeamAppService.cs +++ b/src/Passingwind.Abp.ElsaModule.Application/Teams/WorkflowTeamAppService.cs @@ -119,7 +119,9 @@ public async Task> GetRoleScopesAsync(Gu { var entity = await _workflowTeamRepository.GetAsync(id); - return new ListResultDto(ObjectMapper.Map, List>(entity.RoleScopes)); + var roleScopes = entity.RoleScopes ?? new List(); + + return new ListResultDto(ObjectMapper.Map, List>(roleScopes)); } [Authorize(Policy = ElsaModulePermissions.WorkflowTeams.Update)]