File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed
services/static-webserver/client/source/class/osparc/data/model Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ qx.Class.define("osparc.data.model.Function", {
4141 creationDate : functionData . creationDate ? new Date ( functionData . creationDate ) : this . getCreationDate ( ) ,
4242 lastChangeDate : functionData . lastChangeDate ? new Date ( functionData . lastChangeDate ) : this . getLastChangeDate ( ) ,
4343 thumbnail : functionData . thumbnail || this . getThumbnail ( ) ,
44+ templateId : functionData . templateId || this . getTemplateId ( ) ,
4445 } ) ;
4546
4647 if ( templateData ) {
@@ -127,6 +128,12 @@ qx.Class.define("osparc.data.model.Function", {
127128 init : null
128129 } ,
129130
131+ templateId : {
132+ check : "String" ,
133+ nullable : true ,
134+ init : null ,
135+ } ,
136+
130137 template : {
131138 check : "osparc.data.model.Study" ,
132139 nullable : true ,
@@ -158,19 +165,7 @@ qx.Class.define("osparc.data.model.Function", {
158165 } ,
159166
160167 patchFunction : function ( functionChanges ) {
161- return osparc . store . Functions . patchFunction ( this . getUuid ( ) , functionChanges )
162- . then ( ( ) => {
163- Object . keys ( functionChanges ) . forEach ( fieldKey => {
164- const upKey = qx . lang . String . firstUp ( fieldKey ) ;
165- const setter = "set" + upKey ;
166- this [ setter ] ( functionChanges [ fieldKey ] ) ;
167- } )
168- this . set ( {
169- lastChangeDate : new Date ( )
170- } ) ;
171- const functionData = this . serialize ( ) ;
172- return functionData ;
173- } ) ;
168+ return osparc . store . Functions . patchFunction ( this . getUuid ( ) , functionChanges ) ;
174169 } ,
175170 }
176171} ) ;
You can’t perform that action at this time.
0 commit comments