update table
This commit is contained in:
@@ -43,9 +43,11 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
now_ = now()
|
||||
org_id = new_image['org_id']
|
||||
enrollment = enrollment_layer.collection.get_items(
|
||||
TransactKey(new_image['id']) + SortKey('0') + SortKey('author')
|
||||
# Post-migration: uncomment the following line
|
||||
# + SortKey('CREATED_BY')
|
||||
TransactKey(new_image['id'])
|
||||
+ SortKey('0')
|
||||
+ SortKey('CREATED_BY', rename_key='created_by', path_spec='created_by')
|
||||
# Post-migration: remove the following line
|
||||
+ SortKey('author', rename_key='created_by')
|
||||
)
|
||||
|
||||
if not enrollment:
|
||||
@@ -99,7 +101,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
|
||||
# Add enrollment entry to billing
|
||||
try:
|
||||
created_by = enrollment.get('author')
|
||||
created_by = enrollment.get('created_by')
|
||||
course_id = enrollment['course']['id']
|
||||
course = course_layer.collection.get_items(
|
||||
KeyPair(
|
||||
|
||||
Reference in New Issue
Block a user