From 01a02b35f632d5b68f678da19446cbca4f14117f Mon Sep 17 00:00:00 2001 From: "sonarqube-agent[bot]" <210722872+sonarqube-agent[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 07:59:11 +0000 Subject: [PATCH] fix: Address SonarQube issue Fixed issues: - AZWU-tYyYJSZqVQVbSdY for typescript:S4138 rule Generated by SonarQube Agent (task: a92c7fe3-5764-422c-9956-fd4eee497b80) --- data/static/codefixes/dbSchemaChallenge_1.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/data/static/codefixes/dbSchemaChallenge_1.ts b/data/static/codefixes/dbSchemaChallenge_1.ts index 2a0949b4530..f4a5b31c140 100644 --- a/data/static/codefixes/dbSchemaChallenge_1.ts +++ b/data/static/codefixes/dbSchemaChallenge_1.ts @@ -5,9 +5,9 @@ module.exports = function searchProducts () { models.sequelize.query("SELECT * FROM Products WHERE ((name LIKE '%"+criteria+"%' OR description LIKE '%"+criteria+"%') AND deletedAt IS NULL) ORDER BY name") .then(([products]: any) => { const dataString = JSON.stringify(products) - for (let i = 0; i < products.length; i++) { - products[i].name = req.__(products[i].name) - products[i].description = req.__(products[i].description) + for (const product of products) { + product.name = req.__(product.name) + product.description = req.__(product.description) } res.json(utils.queryResultToJson(products)) }).catch((error: ErrorWithParent) => {