Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SimYunSup
Copy link
Contributor

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 SimYunSup changed the title fix(db-*): Add delete version id for non-mongodb fix(db-*): add delete version id for non-mongodb Jan 16, 2025
DanRibbens
DanRibbens previously approved these changes Jan 16, 2025
@DanRibbens
Copy link
Contributor

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?

@SimYunSup
Copy link
Contributor Author

@DanRibbens I'll add test within 2 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Postgres: Foreign Key constraint violation after deleting an item
2 participants