File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
packages/models-library/src/models_library
services/web/server/src/simcore_service_webserver/projects Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -146,11 +146,17 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
146146
147147 @model_validator (mode = "after" )
148148 def check_model_valid (self ) -> Self :
149- self .locked = self .status in [
150- ProjectStatus .CLONING ,
151- ProjectStatus .EXPORTING ,
152- ProjectStatus .MAINTAINING ,
153- ]
149+ if (
150+ self .status
151+ in [
152+ ProjectStatus .CLONING ,
153+ ProjectStatus .EXPORTING ,
154+ ProjectStatus .MAINTAINING ,
155+ ]
156+ and not self .locked
157+ ):
158+ msg = f"Project is { self .status = } , but it is not locked"
159+ raise ValueError (msg )
154160 if self .locked and not self .current_user_groupids :
155161 msg = "If the project is locked, the current_users list must contain at least the lock owner"
156162 raise ValueError (msg )
Original file line number Diff line number Diff line change @@ -1601,7 +1601,7 @@ async def _get_project_share_state(
16011601
16021602 return ProjectShareState (
16031603 status = ProjectStatus .OPENED ,
1604- locked = app_settings .WEBSERVER_REALTIME_COLLABORATION is None ,
1604+ locked = bool ( app_settings .WEBSERVER_REALTIME_COLLABORATION is None ) ,
16051605 current_user_groupids = await limited_gather (
16061606 * [
16071607 users_service .get_user_primary_group_id (app , user_id = uid )
You can’t perform that action at this time.
0 commit comments