This repository was archived by the owner on Jan 19, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ const SyncSpaces = {
125125 const { data } = await this . client . get ( 'spaces/' + this . targetSpaceId + '/stories' , { with_slug : story . full_slug } )
126126 const existingStory = data . stories [ 0 ]
127127 const storyData = await this . getStoryWithTranslatedSlugs ( sourceStory , existingStory ? existingStory [ 0 ] : null )
128+
128129 await this . updateStoriesAndFolders ( storyData , existingStory , sourceStory )
129130 } catch ( e ) {
130131 console . error (
@@ -167,6 +168,7 @@ const SyncSpaces = {
167168 const { data } = await this . client . get ( `spaces/${ this . targetSpaceId } /stories` , targetFolderParams )
168169 const existingFolder = data . stories [ 0 ] || null
169170 const folderData = await this . getStoryWithTranslatedSlugs ( folderResult . data . story , existingFolder )
171+
170172 delete folderData . id
171173 delete folderData . created_at
172174
@@ -192,6 +194,10 @@ const SyncSpaces = {
192194
193195 await this . updateStoriesAndFolders ( folderData , existingFolder , folder , true )
194196 } catch ( e ) {
197+ if ( e . response . includes ( 'You cannot change the is_folder attribute.' ) ) {
198+ console . log ( chalk . yellow ( '-' ) + ` Folder ${ folder . name } is already a story in the target space ${ this . targetSpaceId } and cannot be synced as a folder` )
199+ continue
200+ }
195201 console . error (
196202 chalk . red ( 'X' ) + ` Folder ${ folder . name } Sync failed: ${ e . message } `
197203 )
You can’t perform that action at this time.
0 commit comments