diff --git a/src/orders/delivery/delivery_modules/data_access/dynamo_handler.py b/src/orders/delivery/delivery_modules/data_access/dynamo_handler.py index 730fa09..90ddc30 100644 --- a/src/orders/delivery/delivery_modules/data_access/dynamo_handler.py +++ b/src/orders/delivery/delivery_modules/data_access/dynamo_handler.py @@ -44,12 +44,13 @@ def update_records(self, records: List[Dict[str, Any]]) -> Dict[str, Any]: """ try: for record in records: - update_expression = "SET delivery_sequence = :val, #status = :statusVal" + update_expression = "SET delivery_sequence = :val, #status = :statusVal, #driver = :driverVal" expression_attribute_values = { ":val": record["delivery_sequence"], ":statusVal": "Programada", + ":driverVal": record["driver"], } - expression_attribute_names = {"#status": "status"} + expression_attribute_names = {"#status": "status", "#driver": "driver"} self.table.update_item( Key={'delivery_date': record['delivery_date'], 'id': record['id']},