Fixes based on test failures.

This commit is contained in:
mike12345567 2022-12-06 12:47:48 +00:00
parent 329a51d010
commit bc77b924c0
3 changed files with 3 additions and 3 deletions

View File

@ -466,8 +466,9 @@ async function destroyApp(ctx: BBContext) {
if (isUnpublish) {
appId = dbCore.getProdAppID(appId)
const devAppId = dbCore.getDevAppID(appId)
// sync before removing the published app
await sdk.applications.syncApp(appId)
await sdk.applications.syncApp(devAppId)
}
const db = isUnpublish ? context.getProdAppDB() : context.getAppDB()

View File

@ -17,7 +17,6 @@ const {
checkBuilderEndpoint,
} = require("./utilities/TestFunctions")
const setup = require("./utilities")
const { basicScreen, basicLayout } = setup.structures
const { AppStatus } = require("../../../db/utils")
const { events } = require("@budibase/backend-core")

View File

@ -10,7 +10,7 @@ export async function syncApp(appId: string) {
}
}
if (!dbCore.isDevAppID(appId)) {
if (dbCore.isProdAppID(appId)) {
throw new Error("This action cannot be performed for production apps")
}