fix lint check
This commit is contained in:
parent
fa7f83bc2f
commit
f5080e539d
@ -452,9 +452,7 @@ class Item(BaseModel):
|
|||||||
if old_list_key.startswith("if_not_exists"):
|
if old_list_key.startswith("if_not_exists"):
|
||||||
old_list = self._get_default(old_list_key)
|
old_list = self._get_default(old_list_key)
|
||||||
if not isinstance(old_list, DynamoType):
|
if not isinstance(old_list, DynamoType):
|
||||||
old_list = DynamoType(
|
old_list = DynamoType(expression_attribute_values[old_list])
|
||||||
expression_attribute_values[old_list]
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
old_list = self.attrs[old_list_key.split(".")[0]]
|
old_list = self.attrs[old_list_key.split(".")[0]]
|
||||||
if "." in old_list_key:
|
if "." in old_list_key:
|
||||||
|
@ -3648,7 +3648,7 @@ def test_update_supports_list_append_with_nested_if_not_exists_operation_and_pro
|
|||||||
|
|
||||||
table = dynamo.Table(table_name)
|
table = dynamo.Table(table_name)
|
||||||
|
|
||||||
table.put_item(Item={"Id": "item-id", "event_history":["other_value"]})
|
table.put_item(Item={"Id": "item-id", "event_history": ["other_value"]})
|
||||||
table.update_item(
|
table.update_item(
|
||||||
Key={"Id": "item-id"},
|
Key={"Id": "item-id"},
|
||||||
UpdateExpression="SET event_history = list_append(if_not_exists(event_history, :empty_list), :new_value)",
|
UpdateExpression="SET event_history = list_append(if_not_exists(event_history, :empty_list), :new_value)",
|
||||||
|
Loading…
Reference in New Issue
Block a user