Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redis node get not editing items #121

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions packages/nodes-base/nodes/Redis/Redis.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,7 @@ export class Redis implements INodeType {

} else if (['delete', 'get', 'keys', 'set'].includes(operation)) {
const items = this.getInputData();

let item: INodeExecutionData;
for (let itemIndex = 0; itemIndex < items.length; itemIndex++) {
item = { json: {} };

if (operation === 'delete') {
const keyDelete = this.getNodeParameter('key', itemIndex) as string;

Expand All @@ -411,7 +407,7 @@ export class Redis implements INodeType {
const keyType = this.getNodeParameter('keyType', itemIndex) as string;

const value = await getValue(client, keyGet, keyType);
set(item.json, propertyName, value);
set(items[itemIndex].json, propertyName, value);
} else if (operation === 'keys') {
const keyPattern = this.getNodeParameter('keyPattern', itemIndex) as string;

Expand All @@ -429,7 +425,7 @@ export class Redis implements INodeType {
}

for (const keyName of keys) {
set(item.json, keyName, await promises[keyName]);
set(items[itemIndex].json, keyName, await promises[keyName]);
}
} else if (operation === 'set') {
const keySet = this.getNodeParameter('key', itemIndex) as string;
Expand Down