diff --git a/backend/services/falukantService.js b/backend/services/falukantService.js index e243dff..1d10aba 100644 --- a/backend/services/falukantService.js +++ b/backend/services/falukantService.js @@ -212,7 +212,7 @@ async function calcRegionalSellPrice(product, knowledgeFactor, regionId, worthPe JOIN falukant_type.region rt2 ON rt2.id = reg.region_type_id JOIN ancestors a ON reg.id = a.parent_id ) - SELECT COALESCE(SUM(CASE WHEN ${exemptTypesString} && ARRAY[region_type] THEN 0 ELSE tax_percent END),0) AS total FROM ancestors;`, + SELECT COALESCE(SUM(CASE WHEN ${exemptTypesString} && ARRAY[region_type]::text[] THEN 0 ELSE tax_percent END),0) AS total FROM ancestors;`, { replacements: { id: regionId }, type: sequelize.QueryTypes.SELECT