mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-02 09:47:00 +02:00
remove extra fixes
This commit is contained in:
parent
e0140e7942
commit
d877997539
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user