Courses re-factor#186
Conversation
…-lab-api into courses-part2
bilalesi
left a comment
There was a problem hiding this comment.
i left few comments, will check it more deep this afternoon
| admins: list[UUID4] | None = None | ||
| owner: ShortenedUser | None = None | ||
|
|
||
| @model_serializer(mode="wrap") |
There was a problem hiding this comment.
you can use VirtualLabWithAdmins.model_dump(exclude_none=True) when needed
There was a problem hiding this comment.
Yes, you had that, but Pydantic does for nested models too.
For the course object nested in the lab, if you do this (exclude_none=True), ti will exclude the start_date, we don't want that.
class CourseOut(BaseModel):
model_config = ConfigDict(from_attributes=True)
id: UUID4
virtual_lab_id: UUID4
institution_id: UUID4
template_project_id: UUID4
status: str
start_date: Optional[date] = None
end_date: Optional[date] = None
last_drop_date: Optional[date] = None
|
it would be great if you can generate a |
Added, will expand with next PR explaining seat management. |
|
/opt/hostedtoolcache/Python/3.12.13/x64/lib/python3.12/site-packages/safety/auth/main.py:6: AuthlibDeprecationWarning: authlib.jose module is deprecated, please use joserfc instead. poetry audit reportLoading... No vulnerabilities found ✨✨ |
|
I included this branch and the fixes in : #187 so closing, |
Sorry for the big diff, most of it is tests, but excluding the tests folder should be manageable.
Future PRs will implement the seat management system