add purge to canceled and failed enrollment
This commit is contained in:
@@ -30,6 +30,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
offset_days = old_image.get('dedup_window_offset_days')
|
||||
billing_day = old_image.get('subscription_billing_day')
|
||||
created_by = old_image.get('created_by')
|
||||
seat = old_image.get('seat')
|
||||
enrollment = Enrollment(
|
||||
course=old_image['course'],
|
||||
user=old_image['user'],
|
||||
@@ -53,6 +54,7 @@ def lambda_handler(event: EventBridgeEvent, context: LambdaContext) -> bool:
|
||||
subscription=subscription,
|
||||
cancel_policy=bool(subscription),
|
||||
created_by=created_by,
|
||||
seat=seat,
|
||||
scheduled_at=datetime.fromisoformat(old_image['scheduled_at']),
|
||||
# Transfer the deduplication window if it exists
|
||||
deduplication_window={'offset_days': offset_days} if offset_days else None,
|
||||
|
||||
Reference in New Issue
Block a user