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

🐞 AWS DynamoDB: Fix Expression Attribute Names - N8N-4187 #3763

Merged
merged 2 commits into from
Jul 24, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/nodes-base/nodes/Aws/DynamoDB/AwsDynamoDB.node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ export class AwsDynamoDB implements INodeType {
const select = this.getNodeParameter('select', 0) as string;
const returnAll = this.getNodeParameter('returnAll', 0) as boolean;
const scan = this.getNodeParameter('scan', 0) as boolean;
const eanUi = this.getNodeParameter('additionalFields.eanUi.eanValues', i, []) as IAttributeNameUi[];
const eanUi = this.getNodeParameter('options.eanUi.eanValues', i, []) as IAttributeNameUi[];

const body: IRequestBody = {
TableName: this.getNodeParameter('tableName', i) as string,
Expand Down
6 changes: 2 additions & 4 deletions packages/nodes-base/nodes/Aws/DynamoDB/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ export function adjustExpressionAttributeValues(eavUi: IAttributeValueUi[]) {
}

export function adjustExpressionAttributeName(eanUi: IAttributeNameUi[]) {

// tslint:disable-next-line: no-any
const ean: { [key: string]: any } = {};
const ean: { [key: string]: string } = {};

eanUi.forEach(({ key, value }) => {
ean[addPound(key)] = { value } as IAttributeValueValue;
ean[addPound(key)] = value;
});

return ean;
Expand Down