rename draft to unlisted

This commit is contained in:
2025-11-28 20:14:00 -03:00
parent a74334b69c
commit c48f289514
8 changed files with 47 additions and 14 deletions

View File

@@ -53,8 +53,7 @@ class Course(BaseModel):
name: str
access_period: int
cert: Cert
draft: bool = False
demo: bool = False
unlisted: bool = False
rawfile: bytes | None = None
@@ -88,7 +87,7 @@ def put_course(course_id: str):
update_expr='SET #name = :name, \
access_period = :access_period, \
cert = :cert, \
draft = :draft, \
unlisted = :unlisted, \
updated_at = :updated_at',
expr_attr_names={
'#name': 'name',
@@ -97,7 +96,7 @@ def put_course(course_id: str):
':name': course.name,
':cert': course.cert.model_dump(),
':access_period': course.access_period,
':draft': course.draft,
':unlisted': course.unlisted,
':updated_at': now(),
},
cond_expr='attribute_exists(sk)',