payload icon indicating copy to clipboard operation
payload copied to clipboard

fix(db-*): add delete version id for non-mongodb

Open SimYunSup opened this issue 11 months ago • 3 comments

Fixes #10526

What?

updateVersion throws error at deleting before version of draft.

Why?

When triggers db.updateVersion with non-mongodb environment, saveVersion in payload/src/versions/saveVersions.ts doesn't remove id in versionData.

How?

Add delete versionData.id for non-mongodb environments.

SimYunSup avatar Jan 16 '25 11:01 SimYunSup

Ideally we would have a test along with this change. @SimYunSup are you able to add an int test to test/versions/int.spec.ts before I merge this?

DanRibbens avatar Jan 16 '25 16:01 DanRibbens

@DanRibbens I'll add test within 2 days.

SimYunSup avatar Jan 17 '25 02:01 SimYunSup

@DanRibbens Is there any thing I have to update on this?

SimYunSup avatar Apr 20 '25 22:04 SimYunSup

🚀 This is included in version v3.54.0

github-actions[bot] avatar Aug 28 '25 13:08 github-actions[bot]