From 2a82c068d3edcdf138b46e011bf9340846779352 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Thu, 13 Aug 2020 17:08:41 +0200 Subject: [PATCH] fix: relax schema while auditing translations Without this change we would have to put in dummy localeTitle values. This defeats the point of making it required. --- curriculum/schema/challengeSchema.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/curriculum/schema/challengeSchema.js b/curriculum/schema/challengeSchema.js index e4f4d3e218..e2c4a30c8a 100644 --- a/curriculum/schema/challengeSchema.js +++ b/curriculum/schema/challengeSchema.js @@ -96,8 +96,9 @@ function getSchemaForLang(lang) { }); if (lang !== 'english') { + // TODO: make this required again once all current challenges have it. schema = schema.append({ - localeTitle: Joi.string().required() + localeTitle: Joi.string().allow('') }); } return schema;