diff --git a/src/portalbackend/PortalBackend.DBAccess/Repositories/CompanyRolesRepository.cs b/src/portalbackend/PortalBackend.DBAccess/Repositories/CompanyRolesRepository.cs index f0b663c2ef..cb14ebdd94 100644 --- a/src/portalbackend/PortalBackend.DBAccess/Repositories/CompanyRolesRepository.cs +++ b/src/portalbackend/PortalBackend.DBAccess/Repositories/CompanyRolesRepository.cs @@ -65,7 +65,7 @@ public void RemoveCompanyAssignedRoles(Guid companyId, IEnumerable companyRole.CompanyRoleRegistrationData!.IsRegistrationRole && companyRoleIds.Contains(companyRole.Id)) .Select(companyRole => new ValueTuple>( companyRole.Id, - companyRole.AgreementAssignedCompanyRoles! + companyRole.AgreementAssignedCompanyRoles.Where(x => x.Agreement!.AgreementStatusId == AgreementStatusId.ACTIVE) .Select(agreementAssignedCompanyRole => new AgreementStatusData( agreementAssignedCompanyRole.AgreementId, agreementAssignedCompanyRole.Agreement!.AgreementStatusId diff --git a/src/registration/Registration.Service/Controllers/RegistrationController.cs b/src/registration/Registration.Service/Controllers/RegistrationController.cs index 49e31955a9..93dd8ba678 100644 --- a/src/registration/Registration.Service/Controllers/RegistrationController.cs +++ b/src/registration/Registration.Service/Controllers/RegistrationController.cs @@ -250,7 +250,7 @@ public Task GetCompanyDetailDataAsync([FromRoute] Guid applic /// /// Id of the application to set the company for. /// The company with its address - /// Example: Post: /api/registration/application/4f0146c6-32aa-4bb1-b844-df7e8babdcb4/companyDetailsWithAddress + /// Example: Post: /api/registration/application/{applicationId}/companyDetailsWithAddress /// Successfully set the company with its address /// A request parameter was incorrect. /// CompanyApplication was not found for the given id.