Allow doing an ADD update of a string set
Fix test
This commit is contained in:
parent
1d600011c5
commit
386ac94abe
2 changed files with 36 additions and 0 deletions
|
|
@ -171,6 +171,12 @@ class Item(BaseModel):
|
|||
decimal.Decimal(existing.value) +
|
||||
decimal.Decimal(new_value)
|
||||
)})
|
||||
elif set(update_action['Value'].keys()) == set(['SS']):
|
||||
existing = self.attrs.get(attribute_name, DynamoType({"SS": {}}))
|
||||
new_set = set(existing.value).union(set(new_value))
|
||||
self.attrs[attribute_name] = DynamoType({
|
||||
"SS": list(new_set)
|
||||
})
|
||||
else:
|
||||
# TODO: implement other data types
|
||||
raise NotImplementedError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue