fix: reset createdAt field when duplicating entry (#21991)

* fix: reset createdAt field when duplicating entry

* fix: reset updatedAt timestamp on clone
This commit is contained in:
Kaio Duarte 2024-11-14 09:29:19 +00:00 committed by GitHub
parent 6a883bcf3f
commit c4c2822dff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -184,7 +184,7 @@ export const createContentTypeRepository: RepositoryFactoryMethod = (
entriesToClone,
async.pipe(
validateParams,
omit('id'),
omit(['id', 'createdAt', 'updatedAt']),
// assign new documentId
assoc('documentId', createDocumentId()),
// Merge new data into it