add enroll to subscribed
This commit is contained in:
@@ -40,8 +40,8 @@ class DeduplicationConflictError(ConflictError): ...
|
||||
class User(BaseModel):
|
||||
id: str | UUID4
|
||||
name: NameStr
|
||||
cpf: CpfStr
|
||||
email: EmailStr
|
||||
cpf: CpfStr
|
||||
|
||||
|
||||
class Course(BaseModel):
|
||||
@@ -123,9 +123,9 @@ def enroll(
|
||||
Context = TypedDict(
|
||||
'Context',
|
||||
{
|
||||
'created_by': Authenticated,
|
||||
'org': Org,
|
||||
'terms': SubscriptionTerms,
|
||||
'created_by': Authenticated,
|
||||
},
|
||||
)
|
||||
|
||||
@@ -251,14 +251,12 @@ def enroll_later(enrollment: Enrollment, context: Context):
|
||||
'sk': f'{scheduled_for.isoformat()}#{lock_hash}',
|
||||
'user': user.model_dump(),
|
||||
'course': course.model_dump(),
|
||||
'org': org.model_dump(),
|
||||
'org_name': org.name,
|
||||
'created_by': {
|
||||
'id': created_by.id,
|
||||
'name': created_by.name,
|
||||
},
|
||||
'subscription_covered': {
|
||||
'billing_day': subscription_terms.billing_day,
|
||||
},
|
||||
'subscription_billing_day': subscription_terms.billing_day,
|
||||
'ttl': ttl(start_dt=scheduled_for),
|
||||
'created_at': now_,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user