Browse Source

Merge pull request #1354 from colinin/fix-null-object-references

fix(wechat): Fix null object references
pull/1357/head
yx lin 5 months ago
committed by GitHub
parent
commit
b414686428
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Tags/Request/WeChatWorkTagChangeMemberRequest.cs
  2. 2
      aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Tags/Response/WeChatWorkTagCreateResponse.cs

4
aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Tags/Request/WeChatWorkTagChangeMemberRequest.cs

@ -45,11 +45,11 @@ public class WeChatWorkTagChangeMemberRequest
{ {
throw new ArgumentNullException("users/parts", "userlist、partylist不能同时为空!"); throw new ArgumentNullException("users/parts", "userlist、partylist不能同时为空!");
} }
if (users.Count > 1000) if (users?.Count > 1000)
{ {
throw new ArgumentOutOfRangeException(nameof(users), "企业成员ID列表单次请求个数不超过1000!"); throw new ArgumentOutOfRangeException(nameof(users), "企业成员ID列表单次请求个数不超过1000!");
} }
if (parts.Count > 100) if (parts?.Count > 100)
{ {
throw new ArgumentOutOfRangeException(nameof(users), "企业部门ID列表单次请求个数不超过100!"); throw new ArgumentOutOfRangeException(nameof(users), "企业部门ID列表单次请求个数不超过100!");
} }

2
aspnet-core/framework/wechat/LINGYUN.Abp.WeChat.Work/LINGYUN/Abp/WeChat/Work/Tags/Response/WeChatWorkTagCreateResponse.cs

@ -17,5 +17,5 @@ public class WeChatWorkTagCreateResponse : WeChatWorkResponse
[NotNull] [NotNull]
[JsonProperty("tagid")] [JsonProperty("tagid")]
[JsonPropertyName("tagid")] [JsonPropertyName("tagid")]
public string TagId { get; set; } public int TagId { get; set; }
} }

Loading…
Cancel
Save