Skip to content

Commit 118aa78

Browse files
Fix PK name
1 parent 0391bb4 commit 118aa78

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

internal/datastore/src/supplier-config-repository.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,13 @@ export class SupplierConfigRepository {
6262
new QueryCommand({
6363
TableName: this.config.supplierConfigTableName,
6464
IndexName: "volumeGroup-index",
65-
KeyConditionExpression: "PK = :pk AND volumeGroup = :groupId",
65+
KeyConditionExpression: "#pk = :pk AND #group = :groupId",
66+
ExpressionAttributeNames: {
67+
"#pk": "PK", // make sure this is the GSI's PK attribute name
68+
"#group": "volumeGroup", // <-- use the **actual** GSI key name
69+
},
6670
ExpressionAttributeValues: {
67-
":pk": "SUPPLIER_ALLOCATIONS",
71+
":pk": "SUPPLIER_ALLOCATION",
6872
":groupId": groupId,
6973
},
7074
}),

0 commit comments

Comments
 (0)