- ver 1.1.15
This commit is contained in:
@@ -842,11 +842,16 @@ module.exports = {
|
||||
return JSON.parse(JSON.stringify(src));
|
||||
},
|
||||
|
||||
CloneRecordToNew(src) {
|
||||
CloneRecordToNew(src, modelTable) {
|
||||
const myrec = Object.assign({}, src);
|
||||
delete myrec._doc['_id'];
|
||||
myrec._id = new ObjectId();
|
||||
|
||||
if (modelTable === 'Circuit') {
|
||||
myrec._doc.name = myrec._doc.name + ' copia';
|
||||
myrec._doc.path = myrec._doc.path + '_copia';
|
||||
}
|
||||
|
||||
return myrec._doc;
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user