diff --git a/src/locales/fr.json b/src/locales/fr.json index adec1a65d228dcc18e369ba02c894e9bc170a6ea..d646b530006f56174fdd860eaaeae67af3fa0bbe 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -984,7 +984,7 @@ "title": "Logement", "question": "De quel type de logement disposez-vous\u00a0?", "individual_house": "Maison individuelle", - "appartment": "Appartement" + "apartment": "Appartement" }, "construction_year": { "title": "Construction", diff --git a/src/migrations/migration.data.ts b/src/migrations/migration.data.ts index 758dfc12f95d6779f7625ec6f9815697ac03fce8..1eb80f0c71c6e1f8d809148a1111ad0fc5d7e59e 100644 --- a/src/migrations/migration.data.ts +++ b/src/migrations/migration.data.ts @@ -565,7 +565,22 @@ export const migrations: Migration[] = [ if (doc.partnersIssueDate) { delete doc.partnersIssueDate } - // TODO remove this ? + return doc + }) + }, + }, + { + baseSchemaVersion: 22, + targetSchemaVersion: 23, + appVersion: '2.3.0', + description: 'Fix apartment typo', + releaseNotes: null, + docTypes: PROFILETYPE_DOCTYPE, + run: async (_client: Client, docs: any[]) => { + return docs.map(doc => { + if (doc.housingType === 'appartment') { + doc.housingType = 'apartment' + } return doc }) },