Skip to content

Commit 7cea55f

Browse files
committed
Store is the source of truth
1 parent 8b8f694 commit 7cea55f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

services/static-webserver/client/source/class/osparc/store/Store.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,10 @@ qx.Class.define("osparc.store.Store", {
488488
return null;
489489
},
490490

491+
isStudyInDebt: function(studyId) {
492+
return Boolean(this.getStudyDebt(studyId));
493+
},
494+
491495
trashStudy: function(studyId) {
492496
const params = {
493497
url: {

services/static-webserver/client/source/class/osparc/study/Utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ qx.Class.define("osparc.study.Utils", {
344344
},
345345

346346
isInDebt: function(studyData) {
347-
return Boolean("debt" in studyData && studyData["debt"] < 0);
347+
return osparc.store.Store.getInstance().isStudyInDebt(studyData["uuid"]);
348348
},
349349

350350
getUiMode: function(studyData) {

0 commit comments

Comments
 (0)