fix test
This commit is contained in:
@@ -79,17 +79,6 @@ def enroll(
|
||||
entity_sk = f'LINKED_ENTITIES#{parent_entity.type}'
|
||||
keyprefix = parent_entity.type.lower()
|
||||
|
||||
# Child knows the parent
|
||||
transact.put(
|
||||
item={
|
||||
'id': enrollment.id,
|
||||
'sk': f'{entity_sk}#PARENT',
|
||||
'created_at': now_,
|
||||
f'{keyprefix}_id': perent_id,
|
||||
},
|
||||
cond_expr='attribute_not_exists(sk)',
|
||||
)
|
||||
|
||||
# Parent knows the child
|
||||
transact.put(
|
||||
item={
|
||||
@@ -101,6 +90,17 @@ def enroll(
|
||||
cond_expr='attribute_not_exists(sk)',
|
||||
)
|
||||
|
||||
# Child knows the parent
|
||||
transact.put(
|
||||
item={
|
||||
'id': enrollment.id,
|
||||
'sk': f'{entity_sk}#PARENT',
|
||||
'created_at': now_,
|
||||
f'{keyprefix}_id': perent_id,
|
||||
},
|
||||
cond_expr='attribute_not_exists(sk)',
|
||||
)
|
||||
|
||||
if org:
|
||||
transact.put(
|
||||
item={
|
||||
|
||||
@@ -43,7 +43,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
# Certificate may have no expiration
|
||||
cert_expires_at = (
|
||||
completed_at + timedelta(days=int(cert['exp_interval']))
|
||||
if 'exp_interval' in cert
|
||||
if cert.get('exp_interval', 0) > 0
|
||||
else None
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user