fix enroll and reenroll relationship
This commit is contained in:
@@ -10,7 +10,7 @@ from layercake.dynamodb import DynamoDBPersistenceLayer, SortKey, TransactKey
|
||||
|
||||
from boto3clients import dynamodb_client
|
||||
from config import ENROLLMENT_TABLE
|
||||
from enrollment import LinkedEntity, enroll
|
||||
from enrollment import Kind, LinkedEntity, enroll
|
||||
from schemas import Course, Enrollment, User
|
||||
|
||||
logger = Logger(__name__)
|
||||
@@ -52,7 +52,12 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
'offset_days': metadata['dedup_window_offset_days'],
|
||||
},
|
||||
linked_entities=frozenset(
|
||||
{LinkedEntity(new_image['id'], 'ENROLLMENT')},
|
||||
{
|
||||
LinkedEntity(
|
||||
id=new_image['id'],
|
||||
kind=Kind.ENROLLMENT,
|
||||
),
|
||||
},
|
||||
),
|
||||
persistence_layer=dyn,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user