get user id from order

This commit is contained in:
2025-07-23 01:14:56 -03:00
parent edecbce356
commit 45a6038066
8 changed files with 22 additions and 16 deletions

View File

@@ -54,8 +54,8 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
'id': f'vacancies#{tenant_id}',
'sk': f'{order_id}#{uuid4()}',
# Post-migration: uncomment the follow lines
# 'id': f'slots#org#{tenant_id}',
# 'sk': f'order#{order_id}#enrollment#{uuid4()}',
# 'id': f'SLOT#ORG#{tenant_id}',
# 'sk': f'ORDER#{order_id}#ENROLLMENT#{uuid4()}',
'course': asdict(slot),
'created_at': now_,
},
@@ -80,6 +80,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
class Course:
id: str
name: str
# Post-migration: remove the following line
time_in_days: int
@@ -93,6 +94,7 @@ def _get_courses(ids: set) -> tuple[Course, ...]:
Course(
id=idx,
name=obj['name'],
# Post-migration: remove the following line
time_in_days=int(obj['access_period']),
)
for idx, obj in result.items()