Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve bug in Review Approver #7874

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

chidozieononiwu
Copy link
Member

No description provided.

@@ -155,7 +155,7 @@
string approver = null;
if (reviewIsApproved)
{
var changeAction = Model.ReviewContent.Review.ChangeHistory.First(_ => _.ChangeAction == ReviewChangeAction.Approved);
var changeAction = Model.ReviewContent.Review.ChangeHistory.FirstOrDefault(_ => _.ChangeAction == ReviewChangeAction.Approved);
if (changeAction != null)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We explicitly null check, so FirstOrDefault is a good option. Approving.

@chidozieononiwu chidozieononiwu merged commit 3d6cacc into Azure:main Mar 14, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants