Skip to content

Commit

Permalink
fix(registration): exclude inactive agreements (#407)
Browse files Browse the repository at this point in the history
when submitting agreements with endpoint
/api/registration/application/{applicationId}/companyRoleAgreementConsents
we only check for active agreements
Refs: CPLP-3667
  • Loading branch information
Phil91 authored Jan 12, 2024
1 parent ae17b41 commit 4405f94
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void RemoveCompanyAssignedRoles(Guid companyId, IEnumerable<CompanyRoleId
.Where(companyRole => companyRole.CompanyRoleRegistrationData!.IsRegistrationRole && companyRoleIds.Contains(companyRole.Id))
.Select(companyRole => new ValueTuple<CompanyRoleId, IEnumerable<AgreementStatusData>>(
companyRole.Id,
companyRole.AgreementAssignedCompanyRoles!
companyRole.AgreementAssignedCompanyRoles.Where(x => x.Agreement!.AgreementStatusId == AgreementStatusId.ACTIVE)
.Select(agreementAssignedCompanyRole => new AgreementStatusData(
agreementAssignedCompanyRole.AgreementId,
agreementAssignedCompanyRole.Agreement!.AgreementStatusId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ public Task<CompanyDetailData> GetCompanyDetailDataAsync([FromRoute] Guid applic
/// </summary>
/// <param name="applicationId" example="4f0146c6-32aa-4bb1-b844-df7e8babdcb4">Id of the application to set the company for.</param>
/// <param name="companyDetailData">The company with its address</param>
/// <remarks>Example: Post: /api/registration/application/4f0146c6-32aa-4bb1-b844-df7e8babdcb4/companyDetailsWithAddress</remarks>
/// <remarks>Example: Post: /api/registration/application/{applicationId}/companyDetailsWithAddress</remarks>
/// <response code="200">Successfully set the company with its address</response>
/// <response code="400">A request parameter was incorrect.</response>
/// <response code="404">CompanyApplication was not found for the given id.</response>
Expand Down

0 comments on commit 4405f94

Please sign in to comment.