Merge pull request #6060 from Budibase/fix/update-icon-context
Explicitly passing requested appId when calling updateAppPackage
This commit is contained in:
commit
a7a3b085aa
|
@ -314,6 +314,7 @@ function getContextDB(key, opts) {
|
|||
toUseAppId = getDevelopmentAppID(appId)
|
||||
break
|
||||
}
|
||||
|
||||
db = dangerousGetDB(toUseAppId, opts)
|
||||
try {
|
||||
cls.setOnContext(key, db)
|
||||
|
|
|
@ -49,6 +49,7 @@ const {
|
|||
getAppDB,
|
||||
getProdAppDB,
|
||||
updateAppId,
|
||||
doInAppContext,
|
||||
} = require("@budibase/backend-core/context")
|
||||
import { getUniqueRows } from "../../utilities/usageQuota/rows"
|
||||
import { quotas } from "@budibase/pro"
|
||||
|
@ -548,6 +549,7 @@ export const sync = async (ctx: any, next: any) => {
|
|||
}
|
||||
|
||||
const updateAppPackage = async (appPackage: any, appId: any) => {
|
||||
return doInAppContext(appId, async () => {
|
||||
const db = getAppDB()
|
||||
const application = await db.get(DocumentTypes.APP_METADATA)
|
||||
|
||||
|
@ -564,6 +566,7 @@ const updateAppPackage = async (appPackage: any, appId: any) => {
|
|||
// remove any cached metadata, so that it will be updated
|
||||
await appCache.invalidateAppMetadata(appId)
|
||||
return newAppPackage
|
||||
})
|
||||
}
|
||||
|
||||
const createEmptyAppPackage = async (ctx: any, app: any) => {
|
||||
|
|
Loading…
Reference in New Issue