Fix encodings

This commit is contained in:
Adria Navarro 2024-12-16 16:55:38 +01:00
parent eb7fcd0219
commit df62845cf9
2 changed files with 5 additions and 1 deletions

View File

@ -70,6 +70,10 @@ export function encodeTableId(tableId: string) {
}
}
export function encodeViewId(viewId: string) {
return encodeURIComponent(viewId)
}
export function breakExternalTableId(tableId: string) {
const parts = tableId.split(DOUBLE_SEPARATOR)
let datasourceId = parts.shift()

View File

@ -66,7 +66,7 @@ export function getSourceId(ctx: Ctx): { tableId: string; viewId?: string } {
if (docIds.isViewId(sourceId)) {
return {
tableId: utils.extractViewInfoFromID(sourceId).tableId,
viewId: sql.utils.encodeTableId(sourceId),
viewId: sql.utils.encodeViewId(sourceId),
}
}
return { tableId: sql.utils.encodeTableId(ctx.params.sourceId) }