diff --git a/packages/strapi-utils/lib/models.js b/packages/strapi-utils/lib/models.js index 73fa91c995..349628459d 100644 --- a/packages/strapi-utils/lib/models.js +++ b/packages/strapi-utils/lib/models.js @@ -486,7 +486,7 @@ module.exports = { const suffix = key.split('_'); // Mysql stores boolean as 1 or 0 if (client === 'mysql' && _.get(models, [model, 'attributes', suffix, 'type']) === 'boolean') { - formattedValue = value === 'true' ? '1' : '0'; + formattedValue = value.toString() === 'true' ? '1' : '0'; } let type;