File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed
packages/contentstack-import/src/import/modules Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -325,20 +325,20 @@ export default abstract class BaseClass {
325
325
return this . stack . globalField ( { api_version : '3.2' } ) . create ( apiData ) . then ( onSuccess ) . catch ( onReject ) ;
326
326
case 'update-gfs' :
327
327
let globalFieldUid = apiData . uid ?? apiData . global_field ?. uid ;
328
- return this . stack
329
- . globalField ( globalFieldUid , { api_version : '3.2' } )
330
- . fetch ( )
331
- . then ( async ( gf ) => {
332
- const updatePayload = omit ( apiData , [ 'uid' ] ) ;
333
- Object . assign ( gf , updatePayload ) ;
334
- try {
335
- const response = await gf . update ( ) ;
336
- return onSuccess ( response ) ;
337
- } catch ( error ) {
338
- return onReject ( error ) ;
339
- }
340
- } )
341
- . catch ( onReject ) ;
328
+ return this . stack
329
+ . globalField ( globalFieldUid , { api_version : '3.2' } )
330
+ . fetch ( )
331
+ . then ( async ( gf ) => {
332
+ const { uid , ... updatePayload } = cloneDeep ( apiData ) ;
333
+ Object . assign ( gf , updatePayload ) ;
334
+ try {
335
+ const response = await gf . update ( ) ;
336
+ return onSuccess ( response ) ;
337
+ } catch ( error ) {
338
+ return onReject ( error ) ;
339
+ }
340
+ } )
341
+ . catch ( onReject ) ;
342
342
case 'create-environments' :
343
343
return this . stack
344
344
. environment ( )
You can’t perform that action at this time.
0 commit comments