Skip to content

fix(payment-providers): Fix uniqueness validation #3713

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

Merged
merged 2 commits into from
May 26, 2025

Conversation

floganz
Copy link
Contributor

@floganz floganz commented May 26, 2025

Context

For unknown reasons rails validatios was written in a way that it will count in code from discarded records which prevent from using the same code even if payment provider was deleted.
DB has proper index looking for unique code only within non-discarded records so we need only update rails validation.

Description

Add condition to the validation and respective tests.

@floganz floganz merged commit fd44a2b into main May 26, 2025
14 checks passed
@floganz floganz deleted the fix-payment-provider-uniqueness-validation branch May 26, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants