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 {
163
163
delete functionInputs . Handler ;
164
164
delete functionInputs . Code ;
165
165
delete functionInputs . CodeSource ;
166
+ // +++++++++++++++++++++++
167
+ // Below are very strange logical for layer unbind, but backend api need me to do this.
166
168
// handle unbind one layer
167
- // this is a very strange logical for layer unbind, but backend api need me to do this.
168
169
if ( functionInputs . Layers && functionInputs . Layers . length === 0 ) {
169
170
functionInputs . Layers . push ( {
170
171
LayerName : '' ,
171
172
LayerVersion : 0 ,
172
173
} ) ;
173
174
}
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
+ }
174
183
await this . request ( functionInputs ) ;
175
184
return true ;
176
185
}
You can’t perform that action at this time.
0 commit comments