File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
packages/models-library/src/models_library Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 3535 ProjectType ,
3636)
3737from ..projects_access import AccessRights , GroupIDStr
38- from ..projects_state import ProjectShareState , ProjectState
38+ from ..projects_state import ProjectState , ProjectStatus
3939from ..utils ._original_fastapi_encoders import jsonable_encoder
4040from ..utils .common_validators import (
4141 empty_str_to_none_pre_validator ,
@@ -105,7 +105,15 @@ def to_domain_model(self) -> dict[str, Any]:
105105 )
106106
107107
108- class ProjectShareStateOutputSchema (ProjectShareState , OutputSchema ): ...
108+ class ProjectShareStateOutputSchema (OutputSchema ):
109+ status : Annotated [ProjectStatus , Field (description = "The status of the project" )]
110+ locked : Annotated [bool , Field (description = "True if the project is locked" )]
111+ current_user_groupids : Annotated [
112+ list [GroupID ],
113+ Field (
114+ description = "Current users in the project (if the project is locked, the list contains only the lock owner)"
115+ ),
116+ ]
109117
110118
111119class ProjectStateOutputSchema (ProjectState , OutputSchema ):
Original file line number Diff line number Diff line change @@ -132,8 +132,7 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
132132 )
133133
134134 model_config = ConfigDict (
135- extra = "forbid" ,
136- json_schema_extra = _update_json_schema_extra ,
135+ extra = "forbid" , json_schema_extra = _update_json_schema_extra
137136 )
138137
139138 @model_validator (mode = "after" )
You can’t perform that action at this time.
0 commit comments