Fix type issue.
This commit is contained in:
parent
1e4cbc769c
commit
bee6d21d82
|
@ -10,10 +10,10 @@ import {
|
||||||
} from "../../../utilities/rowProcessor"
|
} from "../../../utilities/rowProcessor"
|
||||||
import { runStaticFormulaChecks } from "./bulkFormula"
|
import { runStaticFormulaChecks } from "./bulkFormula"
|
||||||
import {
|
import {
|
||||||
|
RenameColumn,
|
||||||
SaveTableRequest,
|
SaveTableRequest,
|
||||||
SaveTableResponse,
|
SaveTableResponse,
|
||||||
Table,
|
Table,
|
||||||
TableRequest,
|
|
||||||
UserCtx,
|
UserCtx,
|
||||||
ViewStatisticsSchema,
|
ViewStatisticsSchema,
|
||||||
ViewV2,
|
ViewV2,
|
||||||
|
@ -45,7 +45,7 @@ export async function save(ctx: UserCtx<SaveTableRequest, SaveTableResponse>) {
|
||||||
const db = context.getAppDB()
|
const db = context.getAppDB()
|
||||||
const { rows, ...rest } = ctx.request.body
|
const { rows, ...rest } = ctx.request.body
|
||||||
let tableToSave: Table & {
|
let tableToSave: Table & {
|
||||||
_rename?: { old: string; updated: string } | null
|
_rename?: { old: string; updated: string } | undefined
|
||||||
} = {
|
} = {
|
||||||
type: "table",
|
type: "table",
|
||||||
_id: generateTableID(),
|
_id: generateTableID(),
|
||||||
|
@ -87,7 +87,7 @@ export async function save(ctx: UserCtx<SaveTableRequest, SaveTableResponse>) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't rename if the name is the same
|
// Don't rename if the name is the same
|
||||||
let { _rename } = tableToSave
|
let _rename: RenameColumn | undefined = tableToSave._rename
|
||||||
/* istanbul ignore next */
|
/* istanbul ignore next */
|
||||||
if (_rename && _rename.old === _rename.updated) {
|
if (_rename && _rename.old === _rename.updated) {
|
||||||
_rename = undefined
|
_rename = undefined
|
||||||
|
|
Loading…
Reference in New Issue