fix
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user