Skip to content

Commit

Permalink
handle nre
Browse files Browse the repository at this point in the history
  • Loading branch information
addixon committed Jun 20, 2024
1 parent dba65b6 commit fd3b64c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mqttlistener/Forward.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Function, "
return new BadRequestResult();
}

if (payload.Resource.Revision.Fields.SystemWorkItemType != "Bug")
if (payload.Resource?.Revision?.Fields?.SystemWorkItemType != "Bug")
{
logger.LogInformation("Ignoring work item type: {WorkItemType}", payload.Resource.Revision.Fields.SystemWorkItemType);
logger.LogInformation("Ignoring work item type: {WorkItemType}", payload.Resource?.Revision?.Fields?.SystemWorkItemType);
return new OkResult();
}

Expand Down

0 comments on commit fd3b64c

Please sign in to comment.