DynamoDB - Send item to DDB Stream on update, not just on create
This commit is contained in:
parent
954004669a
commit
9971bcdfcd
2 changed files with 68 additions and 1 deletions
|
|
@ -1406,6 +1406,7 @@ class DynamoDBBackend(BaseBackend):
|
|||
range_value = None
|
||||
|
||||
item = table.get_item(hash_value, range_value)
|
||||
orig_item = copy.deepcopy(item)
|
||||
|
||||
if not expected:
|
||||
expected = {}
|
||||
|
|
@ -1439,6 +1440,8 @@ class DynamoDBBackend(BaseBackend):
|
|||
)
|
||||
else:
|
||||
item.update_with_attribute_updates(attribute_updates)
|
||||
if table.stream_shard is not None:
|
||||
table.stream_shard.add(orig_item, item)
|
||||
return item
|
||||
|
||||
def delete_item(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue