File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
upload-api/migration-contentful/libs Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ const appDetails = require('../utils/apps/appDetails.json')
2323 */
2424const uidCorrector = ( uid , affix ) => {
2525 let newId = uid ;
26- if ( restrictedUid ?. includes ?. ( uid ) ) {
26+ if ( restrictedUid ?. includes ?. ( uid ) || uid ?. startsWith ?. ( '_ids' ) || uid ?. endsWith ?. ( '_ids' ) ) {
2727 newId = uid ?. replace ?. ( uid , `${ affix } _${ uid } ` ) ;
2828 newId = newId ?. replace ?. ( / [ ^ a - z A - Z 0 - 9 ] + / g, '_' ) ;
2929 }
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ const idArray = require('../utils/restrictedKeyWords');
3636 */
3737const uidCorrector = ( uid , prefix ) => {
3838 let newId = uid ;
39- if ( idArray . includes ( uid ) ) {
39+ if ( idArray . includes ( uid ) || uid . startsWith ( '_ids' ) || uid . endsWith ( '_ids' ) ) {
4040 newId = uid . replace ( uid , `${ prefix } _${ uid } ` ) ;
4141 newId = newId . replace ( / [ ^ a - z A - Z 0 - 9 ] + / g, '_' ) ;
4242 }
You can’t perform that action at this time.
0 commit comments