Merge pull request #7968 from Budibase/always-migrate-navigation

Always try to migrate navigation settings when importing apps
This commit is contained in:
Martin McKeaveney 2022-09-26 15:32:07 +01:00 committed by GitHub
commit f4f0251fdd
1 changed files with 3 additions and 3 deletions

View File

@ -304,7 +304,7 @@ const performAppCreate = async (ctx: any) => {
})
// Migrate navigation settings and screens if required
if (existing && !existing.navigation) {
if (existing) {
const navigation = await migrateAppNavigation()
if (navigation) {
newApplication.navigation = navigation
@ -601,7 +601,7 @@ const migrateAppNavigation = async () => {
// Migrate all screens, removing custom layouts
for (let screen of screens) {
if (!screen.layoutId) {
return
continue
}
const layout = layouts.find(layout => layout._id === screen.layoutId)
screen.layoutId = undefined
@ -615,7 +615,7 @@ const migrateAppNavigation = async () => {
const layout = layouts?.find(
(layout: Layout) => layout._id === BASE_LAYOUT_PROP_IDS.PRIVATE
)
if (layout) {
if (layout && !existing.navigation) {
let navigationSettings: any = {
navigation: "Top",
title: name,