Skip to content

Commit

Permalink
fix: logic error (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chriscbr authored Feb 8, 2024
1 parent 3bfafae commit 0a6c1c4
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dynamodb.w
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ pub class DynamoDBTableAws {
DynamoDBTableAws._putItem(this.tableName, json);
}

pub inflight getItem(key: Map<Attribute>): Map<Attribute> {
pub inflight getItem(key: Map<Attribute>): Map<Attribute>? {
let json = this._itemToJson(key);
let result = DynamoDBTableAws._getItem(this.tableName, json);
return this._rawMapToItem((result ?? {}).get("Item"));
if let res = result {
return this._rawMapToItem(res.get("Item"));
}
return nil;
}

pub inflight scan(): Array<Map<Attribute>> {
Expand Down

0 comments on commit 0a6c1c4

Please sign in to comment.