From 757ebe17c257bc946ed8f8acbc70cb21db1fb2c0 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 1 Oct 2022 12:19:08 +0300 Subject: [PATCH] Update validate.js --- scripts/db/validate.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/db/validate.js b/scripts/db/validate.js index 17c52e1a..f6b0bf10 100644 --- a/scripts/db/validate.js +++ b/scripts/db/validate.js @@ -176,10 +176,10 @@ function validateChannelId(row, i) { const errors = [] let name = normalize(row.name) - let code = row.country - let expected = `${name}.${code}`.toLowerCase() + let code = row.country.toLowerCase() + let expected = `${name}.${code}` - if (expected !== row.normId) { + if (expected !== row.id) { errors.push({ line: i + 2, message: `"${row.id}" must be derived from the channel name "${row.name}" and the country code "${row.country}"`