File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import axios from "axios" ;
22import _ from "lodash" ;
33import * as mobx from "mobx" ;
4- import { v1 , NIL } from "uuid" ;
4+ import { v1 , validate , NIL } from "uuid" ;
55import md5 from "md5" ;
66import qs from "qs" ;
77/**
@@ -540,7 +540,10 @@ Fix: Try adding ${collectionName} on your ARM config initialization.`;
540540 }
541541 ) ;
542542 const collectionRecordId = getProperty ( collectionRecord , "id" ) ;
543- const isCollectionRecordIdValid = isNumber ( collectionRecordId ) ;
543+ const isCollectionRecordIdValid = isEqual (
544+ validate ( collectionRecordId ) ,
545+ false
546+ ) ;
544547 return this . _request ( {
545548 resourceMethod : isCollectionRecordIdValid ? "put" : "post" ,
546549 resourceName : collectionName ,
Original file line number Diff line number Diff line change 2929import axios from 'axios'
3030import _ from 'lodash'
3131import * as mobx from 'mobx'
32- import { v1 as uuidv1 , NIL as NIL_UUID } from 'uuid'
32+ import { v1 as uuidv1 , validate as uuidValidate , NIL as NIL_UUID } from 'uuid'
3333import md5 from 'md5'
3434import qs from 'qs'
3535
@@ -681,7 +681,10 @@ export default class ApiResourceManager {
681681 } ,
682682 )
683683 const collectionRecordId = getProperty ( collectionRecord , 'id' )
684- const isCollectionRecordIdValid = isNumber ( collectionRecordId )
684+ const isCollectionRecordIdValid = isEqual (
685+ uuidValidate ( collectionRecordId ) ,
686+ false ,
687+ )
685688
686689 return this . _request ( {
687690 resourceMethod : isCollectionRecordIdValid ? 'put' : 'post' ,
You can’t perform that action at this time.
0 commit comments