add events
This commit is contained in:
@@ -34,7 +34,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
order = order_layer.collection.get_items(
|
||||
TransactKey(order_id) + SortKey('0') + SortKey('items', path_spec='items'),
|
||||
)
|
||||
tenant_id = order['tenant_id']
|
||||
org_id = order['tenant_id']
|
||||
items = {
|
||||
item['id']: int(item['quantity'])
|
||||
for item in order['items']
|
||||
@@ -51,10 +51,10 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
for slot in slots:
|
||||
transact.put(
|
||||
item={
|
||||
'id': f'vacancies#{tenant_id}',
|
||||
'id': f'vacancies#{org_id}',
|
||||
'sk': f'{order_id}#{uuid4()}',
|
||||
# Post-migration: uncomment the follow lines
|
||||
# 'id': f'SLOT#ORG#{tenant_id}',
|
||||
# 'id': f'SLOT#ORG#{org_id}',
|
||||
# 'sk': f'ORDER#{order_id}#ENROLLMENT#{uuid4()}',
|
||||
'course': asdict(slot),
|
||||
'created_at': now_,
|
||||
|
||||
Reference in New Issue
Block a user