diff --git a/src/ECER.Resources.Documents/Certifications/CertificationRepositoryMapper.cs b/src/ECER.Resources.Documents/Certifications/CertificationRepositoryMapper.cs index b2f0d76f..815160f0 100644 --- a/src/ECER.Resources.Documents/Certifications/CertificationRepositoryMapper.cs +++ b/src/ECER.Resources.Documents/Certifications/CertificationRepositoryMapper.cs @@ -22,7 +22,7 @@ public CertificationRepositoryMapper() .ForMember(d => d.IneligibleReference, opts => opts.MapFrom(s => s.ecer_IneligibleReference)) .ForMember(d => d.Levels, opts => opts.MapFrom(s => s.ecer_certifiedlevel_CertificateId)) .ForMember(d => d.Files, opts => opts.MapFrom(s => s.ecer_documenturl_CertificateId)) - .ForMember(d => d.CertificateConditions, opts => opts.MapFrom(s => s.ecer_certificate_Registrantid.ecer_certificateconditions_Registrantid)); + .ForMember(d => d.CertificateConditions, opts => opts.MapFrom(s => s.ecer_certificate_Registrantid.ecer_certificateconditions_Registrantid.Where(cc => cc.StatusCode == ecer_CertificateConditions_StatusCode.Active))); CreateMap(MemberList.Destination) .ForMember(d => d.Id, opts => opts.MapFrom(s => s.Id))