fix: Kanban if stacked by field has default value, add new record in uncategorized stack doesnt work

This commit is contained in:
Ramesh Mane
2025-09-25 11:43:33 +00:00
parent cf2725aed8
commit 31f51e0c63
5 changed files with 19 additions and 6 deletions

View File

@@ -82,6 +82,7 @@ export async function populateInsertObject({
ltarState,
throwError,
undo = false,
allowNullFieldIds = [],
}: {
meta: TableType
ltarState: Record<string, any>
@@ -89,6 +90,7 @@ export async function populateInsertObject({
row: Record<string, any>
throwError?: boolean
undo?: boolean
allowNullFieldIds?: string[]
}) {
const missingRequiredColumns = new Set()
const insertObj = await meta.columns?.reduce(async (_o: Promise<any>, col) => {
@@ -116,7 +118,7 @@ export async function populateInsertObject({
missingRequiredColumns.add(col.title)
}
if ((!col.ai || undo) && row?.[col.title as string] !== null) {
if ((!col.ai || undo) && (row?.[col.title as string] !== null || allowNullFieldIds.includes(col.id as string))) {
o[col.title as string] = row?.[col.title as string]
}