rename draft to unlisted
This commit is contained in:
@@ -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)',
|
||||
|
||||
Reference in New Issue
Block a user