fix case if don't have attrs
This commit is contained in:
parent
bc1c9a27f1
commit
f8dd5a13c6
@ -450,7 +450,11 @@ class Item(BaseModel):
|
|||||||
old_list_key = list_append_re.group(1)
|
old_list_key = list_append_re.group(1)
|
||||||
# old_key could be a function itself (if_not_exists)
|
# old_key could be a function itself (if_not_exists)
|
||||||
if old_list_key.startswith("if_not_exists"):
|
if old_list_key.startswith("if_not_exists"):
|
||||||
old_list = DynamoType(self._get_default(old_list_key))
|
old_list = self._get_default(old_list_key)
|
||||||
|
if not isinstance(old_list, DynamoType):
|
||||||
|
old_list = DynamoType(
|
||||||
|
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user