File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
services/static-webserver/client/source/class/osparc/store Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -221,12 +221,13 @@ qx.Class.define("osparc.store.Study", {
221221 }
222222 } ;
223223 return osparc . data . Resources . fetch ( "studies" , "getPricingUnit" , params )
224- . then ( pricingUnits => {
225- if ( pricingUnits && pricingUnits [ "pricingUnits" ] ) {
226- return pricingUnits [ "pricingUnits" ] ;
227- } else {
228- throw new Error ( "No pricing units found" ) ;
224+ . then ( selectedPricingUnit => {
225+ // store the fetched pricing unit in the cache
226+ if ( ! ( studyId in this . __nodePricingUnit ) ) {
227+ this . __nodePricingUnit [ studyId ] = { } ;
229228 }
229+ this . __nodePricingUnit [ studyId ] [ nodeId ] = selectedPricingUnit ;
230+ return selectedPricingUnit ;
230231 } )
231232 . catch ( err => {
232233 console . error ( "Failed to fetch pricing units:" , err ) ;
You can’t perform that action at this time.
0 commit comments