fix duplicate user
This commit is contained in:
@@ -13,8 +13,6 @@ from config import ENROLLMENT_TABLE
|
||||
from enrollment import (
|
||||
Course,
|
||||
Enrollment,
|
||||
Kind,
|
||||
LinkedEntity,
|
||||
SubscriptionFrozenError,
|
||||
User,
|
||||
enroll,
|
||||
@@ -64,14 +62,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
# Reuse the deduplication window if it exists
|
||||
deduplication_window={'offset_days': offset_days} if offset_days else None,
|
||||
# The enrollment must know its source
|
||||
linked_entities=frozenset(
|
||||
{
|
||||
LinkedEntity(
|
||||
id=new_image['id'],
|
||||
kind=Kind.ENROLLMENT,
|
||||
),
|
||||
},
|
||||
),
|
||||
parent_entity=new_image['id'],
|
||||
persistence_layer=dyn,
|
||||
)
|
||||
except SubscriptionFrozenError:
|
||||
|
||||
Reference in New Issue
Block a user