Skip to content

Commit a25630b

Browse files
committed
Fixed NullReferenceException when getting group stats
1 parent d5a2566 commit a25630b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

GetZendeskGroupStats/GetZendeskGroupStats.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static void Main(string[] args)
4343

4444
if (args == null || args.Length == 0)
4545
{
46-
Common.Tools.PrintHelp(_api);
46+
Common.Tools.PrintGroupHelp(_api);
4747
return;
4848
}
4949

@@ -118,7 +118,7 @@ private static void GetResult(long groupId)
118118
_allTicketsInGroup.AddRange(ticketPage.Tickets.Where(t => t.GroupId == groupId).ToList());
119119
}
120120

121-
_allOpenTicketsInGroup = _allTicketsInGroup.Where(t => !unwantedStatuses.Contains(t.Status.ToLower()) && ticketTypes.Contains(t.Type.ToLower())).ToList();
121+
_allOpenTicketsInGroup = _allTicketsInGroup.Where(t => t.Status != null && t.Type != null && !unwantedStatuses.Contains(t.Status.ToLower()) && ticketTypes.Contains(t.Type.ToLower())).ToList();
122122

123123
// Get number of open tickets
124124
GetNumOpenTicketsInGroup();

0 commit comments

Comments
 (0)