fix issued cert
This commit is contained in:
@@ -72,8 +72,8 @@ def get_enrollment(id: str):
|
||||
record = enrollment_layer.collection.get_items(
|
||||
TransactKey(id)
|
||||
+ SortKey('0')
|
||||
+ SortKey('STARTED', rename_key='started_at', path_spec='started_at')
|
||||
+ SortKey('COMPLETED', rename_key='completed_at', path_spec='completed_at')
|
||||
# + SortKey('STARTED', rename_key='started_at', path_spec='started_at')
|
||||
# + SortKey('COMPLETED', rename_key='completed_at', path_spec='completed_at')
|
||||
+ SortKey('FAILED', rename_key='failed_at', path_spec='failed_at')
|
||||
+ SortKey('CANCELED', rename_key='canceled')
|
||||
+ SortKey('ARCHIVED', rename_key='archived_at', path_spec='archived_at')
|
||||
|
||||
@@ -201,7 +201,10 @@ 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 = :updated_at',
|
||||
update_expr='SET #status = :canceled, \
|
||||
access_expired = :true, \
|
||||
canceled_at = :now, \
|
||||
updated_at = :now',
|
||||
cond_expr='#status = :pending',
|
||||
expr_attr_names={
|
||||
'#status': 'status',
|
||||
@@ -209,7 +212,8 @@ def set_status_as_canceled(
|
||||
expr_attr_values={
|
||||
':canceled': 'CANCELED',
|
||||
':pending': 'PENDING',
|
||||
':updated_at': now_,
|
||||
':true': True,
|
||||
':now': now_,
|
||||
},
|
||||
)
|
||||
transact.put(
|
||||
@@ -217,7 +221,7 @@ def set_status_as_canceled(
|
||||
'id': id,
|
||||
'sk': 'CANCELED',
|
||||
'canceled_by': created_by,
|
||||
'canceled_at': now_,
|
||||
'created_at': now_,
|
||||
},
|
||||
)
|
||||
transact.delete(
|
||||
@@ -256,7 +260,7 @@ def set_status_as_canceled(
|
||||
transact.delete(
|
||||
key=KeyPair(
|
||||
pk=id,
|
||||
sk='SCHEDULE#SET_AS_EXPIRED',
|
||||
sk='SCHEDULE#SET_ACCESS_EXPIRED',
|
||||
)
|
||||
)
|
||||
transact.delete(
|
||||
|
||||
Reference in New Issue
Block a user