Fix wrong type if exists
This commit is contained in:
parent
dfa7935e13
commit
cf157287e7
@ -162,12 +162,13 @@ class Item(BaseModel):
|
||||
|
||||
# If it already exists, get its value so we dont overwrite it
|
||||
if path in self.attrs:
|
||||
value = self.attrs[path].cast_value
|
||||
value = self.attrs[path]
|
||||
|
||||
if value in expression_attribute_values:
|
||||
value = DynamoType(expression_attribute_values[value])
|
||||
else:
|
||||
value = DynamoType({"S": value})
|
||||
if type(value) != DynamoType:
|
||||
if value in expression_attribute_values:
|
||||
value = DynamoType(expression_attribute_values[value])
|
||||
else:
|
||||
value = DynamoType({"S": value})
|
||||
|
||||
if '.' not in key:
|
||||
self.attrs[key] = value
|
||||
|
Loading…
Reference in New Issue
Block a user