This commit is contained in:
2025-07-03 15:36:30 -03:00
parent ce1c1b367e
commit 208c43f398
18 changed files with 261 additions and 78 deletions

View File

@@ -263,13 +263,13 @@ def set_status_as_canceled(
with persistence_layer.transact_writer() as transact:
transact.update(
key=KeyPair(id, '0'),
update_expr='SET #status = :canceled, updated_at = :update',
update_expr='SET #status = :canceled, updated_at = :updated_at',
expr_attr_names={
'#status': 'status',
},
expr_attr_values={
':canceled': 'CANCELED',
':update': now_,
':updated_at': now_,
},
)
transact.put(
@@ -321,13 +321,13 @@ def set_status_as_canceled(
# Post-migration: uncomment the following line
# key=KeyPair(order_id, f'slots#enrollment#{enrollment_id}'),
key=KeyPair(order_id, f'generated_items#{enrollment_id}'),
update_expr='SET #status = :status, update_date = :update',
update_expr='SET #status = :status, updated_at = :updated_at',
expr_attr_names={
'#status': 'status',
},
expr_attr_values={
':status': 'ROLLBACK',
':update': now_,
':updated_at': now_,
},
cond_expr='attribute_exists(sk)',
table_name=ORDER_TABLE,