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(thresholds): Fix updating plan with deleted thresholds #2479

Merged
merged 3 commits into from
Aug 29, 2024

Conversation

ivannovosad
Copy link
Contributor

Context

We were getting validation erros when updating a plan via the UI.
The problem was a specific combination of: removing and re-adding thresholds with the same amount because of a constraint. First we were creating a new threshold while the old one (with the same amount was still in the DB). Also there might have been the same threshold wtih that amount existing but soft deleted.

Description

Refactor the validations, and saving logic of thresholds.

@ivannovosad ivannovosad force-pushed the fix-usage-thresholds branch 2 times, most recently from 61136d0 to 55af7b9 Compare August 26, 2024 11:33
@ivannovosad ivannovosad force-pushed the fix-usage-thresholds branch 8 times, most recently from b406d18 to 0fc75f0 Compare August 28, 2024 13:45
@nudded nudded force-pushed the fix-usage-thresholds branch from 0fc75f0 to 710656a Compare August 29, 2024 13:19
@vincent-pochet vincent-pochet merged commit ddd4908 into main Aug 29, 2024
6 checks passed
@vincent-pochet vincent-pochet deleted the fix-usage-thresholds branch August 29, 2024 16:36
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.

3 participants