From 53f8997d622694153b6a74766da295179845a7d3 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Tue, 9 Jul 2019 18:21:00 -0500 Subject: [PATCH] Fix for UpdateExpression with newline. Closes #2275. --- moto/dynamodb2/responses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moto/dynamodb2/responses.py b/moto/dynamodb2/responses.py index 5dde432d5..e345d8861 100644 --- a/moto/dynamodb2/responses.py +++ b/moto/dynamodb2/responses.py @@ -626,7 +626,7 @@ class DynamoHandler(BaseResponse): name = self.body['TableName'] key = self.body['Key'] return_values = self.body.get('ReturnValues', 'NONE') - update_expression = self.body.get('UpdateExpression') + update_expression = self.body.get('UpdateExpression', '').strip() attribute_updates = self.body.get('AttributeUpdates') expression_attribute_names = self.body.get( 'ExpressionAttributeNames', {})