Skip to content

Commit abdf812

Browse files
authored
Add promo to CdrUserPreview for new column on Siarnaq's table (#823)
In the data table in Siarnaq (on the left panel of the admin page), we should add a 5th column to indicate the promo, which is crucial yet missing information, according to some feedback.
1 parent 1b405f0 commit abdf812

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

app/modules/cdr/endpoints_cdr.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ async def get_cdr_users_pending_validation(
145145
}
146146

147147
return [
148-
schemas_cdr.CdrUser(
148+
schemas_cdr.CdrUserPreview(
149149
account_type=user.account_type,
150150
school_id=user.school_id,
151151
curriculum=schemas_cdr.CurriculumComplete(
@@ -155,10 +155,6 @@ async def get_cdr_users_pending_validation(
155155
if user.id in curriculum_memberships_mapping
156156
else None,
157157
promo=user.promo,
158-
email=user.email,
159-
birthday=user.birthday,
160-
phone=user.phone,
161-
floor=user.floor,
162158
id=user.id,
163159
name=user.name,
164160
firstname=user.firstname,

app/modules/cdr/schemas_cdr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ class CurriculumComplete(CurriculumBase):
3838

3939
class CdrUserPreview(CoreUserSimple):
4040
curriculum: CurriculumComplete | None = None
41+
promo: int | None = None
4142

4243

4344
class CdrUser(CdrUserPreview):
44-
promo: int | None = None
4545
email: str
4646
birthday: date | None = None
4747
phone: str | None = None

0 commit comments

Comments
 (0)