This commit is contained in:
2025-09-17 22:41:25 -03:00
parent 0e6a503ee4
commit b4c7e191fe
2 changed files with 10 additions and 10 deletions

View File

@@ -148,7 +148,7 @@ def enroll(
ttl_expiration = ttl(start_dt=now_, days=course.access_period - offset_days)
transact.put(
item={
'id': 'lock',
'id': 'LOCK',
'sk': lock_hash,
'enrollment_id': enrollment.id,
'created_at': now_,
@@ -160,7 +160,7 @@ def enroll(
transact.put(
item={
'id': enrollment.id,
'sk': 'lock',
'sk': 'LOCK',
'hash': lock_hash,
'created_at': now_,
'ttl': ttl_expiration,
@@ -170,14 +170,14 @@ def enroll(
transact.put(
item={
'id': enrollment.id,
'sk': 'metadata#deduplication_window',
'sk': 'METADATA#DEDUPLICATION_WINDOW',
'offset_days': offset_days,
'created_at': now_,
},
)
else:
transact.condition(
key=KeyPair('lock', lock_hash),
key=KeyPair('LOCK', lock_hash),
cond_expr='attribute_not_exists(sk)',
exc_cls=DeduplicationConflictError,
)