File tree Expand file tree Collapse file tree
services/apps/members_enrichment_worker/src/sources/crustdata Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ export default class EnrichmentServiceCrustdata extends LoggerBase implements IE
8282 transform : ( languages : string [ ] ) => ( languages || [ ] ) . sort ( ) ,
8383 } ,
8484 [ MemberAttributeName . SCHOOLS ] : {
85- // Same school can appear multiple times (different degrees) .
85+ // education.schools[] is one entry per degree; CDP stores school names only .
8686 fields : [ 'education.schools' ] ,
8787 transform : ( schools : Array < { school ?: string } > ) =>
8888 [ ...new Set ( ( schools || [ ] ) . map ( ( s ) => s . school ?. trim ( ) ) . filter ( Boolean ) ) ] . sort ( ) ,
@@ -147,7 +147,7 @@ export default class EnrichmentServiceCrustdata extends LoggerBase implements IE
147147 const response : IMemberEnrichmentCrustdataRemainingCredits = ( await axios ( config ) ) . data
148148
149149 // Live enrich costs 7 credits per profile.
150- return response . account . credits > 7
150+ return response . account . credits >= 7
151151 } catch ( error ) {
152152 this . log . error ( 'Error while checking Crustdata account usage' , error )
153153 throw error
You can’t perform that action at this time.
0 commit comments