Skip to content

Commit

Permalink
Changed var name
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Howes committed Jun 10, 2020
1 parent c47657a commit 4369d79
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ private async Task ValidateLegalEntityHasNoCommitments(EmployerAgreementView agr
{
var commitments = await _employerCommitmentApi.GetEmployerAccountSummary(accountId);

var returnValue = commitments.FirstOrDefault(c =>
var commitment = commitments.FirstOrDefault(c =>
!string.IsNullOrEmpty(c.LegalEntityIdentifier)
&& c.LegalEntityIdentifier.Equals(agreement.LegalEntityCode)
&& c.LegalEntityOrganisationType == agreement.LegalEntitySource);

if (returnValue != null && (returnValue.ActiveCount + returnValue.PausedCount + returnValue.PendingApprovalCount) != 0)
if (commitment != null && (commitment.ActiveCount + commitment.PausedCount + commitment.PendingApprovalCount) != 0)
{
validationResult.AddError(nameof(agreement.HashedAgreementId), "Agreement has already been signed and has active commitments");
throw new InvalidRequestException(validationResult.ValidationDictionary);
Expand Down

0 comments on commit 4369d79

Please sign in to comment.