Only raise EmptyKeyAttributeException when the value node is empty (#4014)
This fixes a bug where all updates to keys (including GSIs) would raise EmptyKeyAttributeException, even when the new value was not an empty string.
This commit is contained in:
parent
7f0475fc18
commit
67ae84e2c4
2 changed files with 28 additions and 1 deletions
|
|
@ -332,7 +332,11 @@ class EmptyStringKeyValueValidator(DepthFirstTraverser):
|
|||
assert len(node.children) == 2
|
||||
key = node.children[0].children[0].children[0]
|
||||
val_node = node.children[1].children[0]
|
||||
if val_node.type in ["S", "B"] and key in self.key_attributes:
|
||||
if (
|
||||
not val_node.value
|
||||
and val_node.type in ["S", "B"]
|
||||
and key in self.key_attributes
|
||||
):
|
||||
raise EmptyKeyAttributeException
|
||||
return node
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue