diff --git a/package.json b/package.json index b451706..debc1ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@qlever-llc/target-helper", - "version": "1.6.2", + "version": "1.6.3", "description": "A Trellis microservice to fill in around Target integration", "author": "Andrew Balmos ", "license": "Apache-2.0", diff --git a/src/conversions.ts b/src/conversions.ts index 7c67cb0..186ba58 100644 --- a/src/conversions.ts +++ b/src/conversions.ts @@ -113,6 +113,7 @@ const conversions: Record = { name: 'California Prop 65 Statement', urlName: 'ca-prop-65-statements', type: 'application/vnd.trellisfw.ca-prop-65-statement.1+json', + alternativeUrlNames: ['california-proposition-65-statements'], }, 'Country of Origin Statement': { name: 'Country of Origin Statement', diff --git a/src/pdfJob.ts b/src/pdfJob.ts index b58bb37..0fcf75c 100644 --- a/src/pdfJob.ts +++ b/src/pdfJob.ts @@ -261,6 +261,12 @@ export const jobHandler: WorkerFunction = async (job, { jobId, log, oada }) => { // Note: One day we might officially separate "identification" from "transcription". This is almost that. // TODO: Reconsider this as it doesn't really work well with jobs created outside of the helper watches if ( + // Added the 'unidentified' check to stop doing this flow for misidentified + // documents coming through e.g. fl-sync. Theres just too much cross over of + // one doc type used to satisfy another doc type. e.g. we may ask a product label to be extract it + // and target may recognize it as nutrition information because it contains both. This condition + // lets us continue doing this for jobs specifically coming in as unidentified + job.config['oada-doc-type'] === 'unidentified' && job.config['oada-doc-type'] !== documentType && !matchesAlternateUrlNames( job.config['oada-doc-type'],