remove extra fixes

This commit is contained in:
Charlie Kolb 2025-10-15 14:11:46 +02:00
parent e0140e7942
commit d877997539
No known key found for this signature in database
2 changed files with 2 additions and 20 deletions

View File

@ -59,7 +59,7 @@ function resolvePath(
return `(${base})::timestamp`;
}
if (typeof value === 'boolean') {
return `CAST(${base})::boolean`;
return `(${base})::boolean`;
}
// by converting to text by default we end up with `true` for an equals NULL check

View File

@ -26,7 +26,7 @@ import type {
DataTableColumnType,
DataTableRowReturnWithState,
} from 'n8n-workflow';
import { DATA_TABLE_SYSTEM_COLUMN_TYPE_MAP, UserError, validateFieldType } from 'n8n-workflow';
import { DATA_TABLE_SYSTEM_COLUMN_TYPE_MAP, validateFieldType } from 'n8n-workflow';
import { RoleService } from '@/services/role.service';
@ -518,24 +518,6 @@ export class DataTableService {
}
}
if (columnType === 'json') {
// json accepts objects or strings containing objects as input
// but expects values with a path for output/get/read operations
if (typeof cell === 'string') {
try {
JSON.parse(cell);
return cell;
} catch (e) {
throw new UserError(`Failed to parse string input '${cell}' as object for json column`);
}
} else if (typeof cell !== 'object') {
throw new UserError(
`Unexpected non-object input '${cell}' of type ${typeof cell} for json column`,
);
}
return JSON.stringify(cell);
}
return validationResult.newValue as DataTableColumnJsType;
}