diff --git a/backend/migrations/20201030110539-5_1_1-MigratePageLayouts.js b/backend/migrations/20201030110539-5_1_1-MigratePageLayouts.js index 66f2629dac..eaee7c1443 100644 --- a/backend/migrations/20201030110539-5_1_1-MigratePageLayouts.js +++ b/backend/migrations/20201030110539-5_1_1-MigratePageLayouts.js @@ -34,7 +34,9 @@ module.exports = { migrate(queryInterface, pageData => { function migrateLayoutSection(layoutSection) { if (pageData[layoutSection]) { - pageData.layout.push({ type: layoutSection, content: pageData[layoutSection] }); + if (!_.isEmpty(pageData[layoutSection])) { + pageData.layout.push({ type: layoutSection, content: pageData[layoutSection] }); + } delete pageData[layoutSection]; } }