Fixed update_item of DynamoDB to deal with the list type.
This commit is contained in:
parent
63d5af90b4
commit
a2aefc49b4
2 changed files with 43 additions and 1 deletions
|
|
@ -298,7 +298,9 @@ class Item(BaseModel):
|
|||
new_value = list(update_action['Value'].values())[0]
|
||||
if action == 'PUT':
|
||||
# TODO deal with other types
|
||||
if isinstance(new_value, list) or isinstance(new_value, set):
|
||||
if isinstance(new_value, list):
|
||||
self.attrs[attribute_name] = DynamoType({"L": new_value})
|
||||
elif isinstance(new_value, set):
|
||||
self.attrs[attribute_name] = DynamoType({"SS": new_value})
|
||||
elif isinstance(new_value, dict):
|
||||
self.attrs[attribute_name] = DynamoType({"M": new_value})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue