File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
services/static-webserver/client/source/class/osparc Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -410,7 +410,9 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
410410
411411 resourcesList . forEach ( study => {
412412 const state = study [ "state" ] ;
413- if ( state && "shareState" in state && state [ "shareState" ] [ "locked" ] && state [ "shareState" ] [ "status" ] === "CLOSING" ) {
413+ const projectLocked = osparc . study . Utils . state . isProjectLocked ( state ) ;
414+ const projectStatus = osparc . study . Utils . state . getProjectStatus ( state ) ;
415+ if ( projectLocked && projectStatus === "CLOSING" ) {
414416 // websocket might have already notified that the state was closed.
415417 // But the /projects calls response got after the ws message. Ask again to make sure
416418 const delay = 2000 ;
Original file line number Diff line number Diff line change @@ -375,6 +375,17 @@ qx.Class.define("osparc.study.Utils", {
375375 } ,
376376
377377 state : {
378+ getProjectStatus : function ( state ) {
379+ if (
380+ state &&
381+ "shareState" in state &&
382+ "status" in state [ "shareState" ]
383+ ) {
384+ return state [ "shareState" ] [ "status" ] ;
385+ }
386+ return null ;
387+ } ,
388+
378389 isProjectLocked : function ( state ) {
379390 if (
380391 state &&
You can’t perform that action at this time.
0 commit comments