mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(Postgres Node): Accommodate null values in query parameters for expressions (#13544)
This commit is contained in:
@@ -14,7 +14,12 @@ import type {
|
||||
QueriesRunner,
|
||||
QueryWithValues,
|
||||
} from '../../helpers/interfaces';
|
||||
import { isJSON, replaceEmptyStringsByNulls, stringToArray } from '../../helpers/utils';
|
||||
import {
|
||||
evaluateExpression,
|
||||
isJSON,
|
||||
replaceEmptyStringsByNulls,
|
||||
stringToArray,
|
||||
} from '../../helpers/utils';
|
||||
import { optionsCollection } from '../common.descriptions';
|
||||
|
||||
const properties: INodeProperties[] = [
|
||||
@@ -84,8 +89,9 @@ export async function execute(
|
||||
const resolvables = getResolvables(rawValues);
|
||||
if (resolvables.length) {
|
||||
for (const resolvable of resolvables) {
|
||||
const evaluatedExpression =
|
||||
this.evaluateExpression(`${resolvable}`, index)?.toString() ?? '';
|
||||
const evaluatedExpression = evaluateExpression(
|
||||
this.evaluateExpression(`${resolvable}`, index),
|
||||
);
|
||||
const evaluatedValues = isJSON(evaluatedExpression)
|
||||
? [evaluatedExpression]
|
||||
: stringToArray(evaluatedExpression);
|
||||
|
||||
Reference in New Issue
Block a user