From 4aa14960d2e8fee2acd714a33ede0bddac163c57 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Wed, 11 Nov 2015 21:59:55 -0500 Subject: [PATCH] Add support for partial updates and SS in dynamodb. --- moto/dynamodb2/models.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/moto/dynamodb2/models.py b/moto/dynamodb2/models.py index 8266d5588..612a0c3d3 100644 --- a/moto/dynamodb2/models.py +++ b/moto/dynamodb2/models.py @@ -127,7 +127,10 @@ class Item(object): new_value = list(update_action['Value'].values())[0] if action == 'PUT': # TODO deal with other types - self.attrs[attribute_name] = DynamoType({"S": new_value}) + if isinstance(new_value, list) or isinstance(new_value, set): + self.attrs[attribute_name] = DynamoType({"SS": new_value}) + else: + self.attrs[attribute_name] = DynamoType({"S": new_value}) class Table(object):