@@ -52,8 +52,8 @@ def lambda_handler(event, context):
5252 The same input event file
5353 """
5454 # Deserialize event into strongly typed object
55- awsEvent :AWSEvent = Marshaller .unmarshall (event , AWSEvent ) # type: ignore
56- detail :ContractStatusChanged = awsEvent .detail # type: ignore
55+ awsEvent : AWSEvent = Marshaller .unmarshall (event , AWSEvent ) # type: ignore
56+ detail : ContractStatusChanged = awsEvent .detail # type: ignore
5757
5858 save_contract_status (detail )
5959
@@ -77,13 +77,11 @@ def save_contract_status(contract_status_changed_event):
7777 logger .info ("Saving contract status to contract status table. %s" , contract_status_changed_event .contract_id )
7878
7979 return table .update_item (
80- Key = {
81- 'property_id' : contract_status_changed_event .property_id
82- },
83- UpdateExpression = "set contract_status=:t, contract_last_modified_on=:m, contract_id=:c" ,
84- ExpressionAttributeValues = {
85- ':c' : contract_status_changed_event .contract_id ,
86- ':t' : contract_status_changed_event .contract_status ,
87- ':m' : contract_status_changed_event .contract_last_modified_on
88- }
89- )
80+ Key = {"property_id" : contract_status_changed_event .property_id },
81+ UpdateExpression = "set contract_status=:t, contract_last_modified_on=:m, contract_id=:c" ,
82+ ExpressionAttributeValues = {
83+ ":c" : contract_status_changed_event .contract_id ,
84+ ":t" : contract_status_changed_event .contract_status ,
85+ ":m" : contract_status_changed_event .contract_last_modified_on ,
86+ },
87+ )
0 commit comments