From a4299d55bc504ebc5ba075cfe871a148d58ed24a Mon Sep 17 00:00:00 2001 From: LionelB Date: Mon, 2 Sep 2019 11:42:12 +0200 Subject: [PATCH] fix(data): add title to cdt documents --- packages/code-du-travail-data/indexing/populate.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/code-du-travail-data/indexing/populate.js b/packages/code-du-travail-data/indexing/populate.js index 2047ed70b6..64ee286323 100644 --- a/packages/code-du-travail-data/indexing/populate.js +++ b/packages/code-du-travail-data/indexing/populate.js @@ -84,9 +84,9 @@ function* cdtnDocumentsGen() { yield selectAll( "article", require("@socialgouv/legi-data/data/LEGITEXT000006072050.json") - ).map(({ data: { id, num, date_debut, title, texte, texteHtml } }) => ({ + ).map(({ data: { id, num, date_debut, texte, texteHtml } }) => ({ source: SOURCES.CDT, - title, + title: fixArticleNum(id, num), slug: slugify(fixArticleNum(id, num)), description: texte.slice(0, texte.indexOf("…", 150)), html: texteHtml,