mirror of
https://github.com/status-im/spiffworkflow-connector.git
synced 2025-02-20 18:48:17 +00:00
AWS library has strong feelings about things being decimal and not float.
This commit is contained in:
parent
1b9ecca6aa
commit
3fa42d451a
@ -1,6 +1,6 @@
|
||||
"""AddDynamoItem."""
|
||||
import json
|
||||
|
||||
from decimal import Decimal
|
||||
from connector_aws.auths.simpleAuth import SimpleAuth # type: ignore
|
||||
|
||||
|
||||
@ -25,7 +25,8 @@ class AddDynamoItem:
|
||||
# Get the service resource.
|
||||
self.dynamodb = SimpleAuth("dynamodb", config).get_resource()
|
||||
self.table = self.dynamodb.Table(self.table_name)
|
||||
self.item_data = json.loads(self.item_data)
|
||||
self.item_data = json.loads(self.item_data, parse_float=Decimal)
|
||||
|
||||
|
||||
result = self.table.put_item(Item=self.item_data)
|
||||
if "ResponseMetadata" in result:
|
||||
|
Loading…
x
Reference in New Issue
Block a user