File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -163,14 +163,23 @@ class Scf {
163163 delete functionInputs . Handler ;
164164 delete functionInputs . Code ;
165165 delete functionInputs . CodeSource ;
166+ // +++++++++++++++++++++++
167+ // Below are very strange logical for layer unbind, but backend api need me to do this.
166168 // handle unbind one layer
167- // this is a very strange logical for layer unbind, but backend api need me to do this.
168169 if ( functionInputs . Layers && functionInputs . Layers . length === 0 ) {
169170 functionInputs . Layers . push ( {
170171 LayerName : '' ,
171172 LayerVersion : 0 ,
172173 } ) ;
173174 }
175+ // handler empty environment variables
176+ if (
177+ ! functionInputs . Environment ||
178+ ! functionInputs . Environment . Variables ||
179+ functionInputs . Environment . Variables . length === 0
180+ ) {
181+ functionInputs . Environment = { Variables : [ { Key : '' , Value : '' } ] } ;
182+ }
174183 await this . request ( functionInputs ) ;
175184 return true ;
176185 }
You can’t perform that action at this time.
0 commit comments