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

Prevent deprecated validation events #2375

Merged
merged 5 commits into from
May 17, 2022
Merged

Conversation

thiagoyoussef
Copy link
Member

@thiagoyoussef thiagoyoussef commented May 11, 2022

close #2374

@viezly
Copy link

viezly bot commented May 11, 2022

Changes preview:

Legend:

👀 Review pull request on Viezly

@thiagoyoussef thiagoyoussef force-pushed the 2374-deprecated-validation-events branch from 98f7fd2 to 8e2984d Compare May 11, 2022 12:13
@thiagoyoussef thiagoyoussef force-pushed the 2374-deprecated-validation-events branch 2 times, most recently from 4fd90b1 to 7a2256a Compare May 12, 2022 08:12
@thiagoyoussef thiagoyoussef marked this pull request as ready for review May 12, 2022 11:05
validation_eventable.validation_events.first.destroy
end
end
destroy_old_validations(events, 3) if @check_level == 'mx' && !result.success
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happen if we decide to change validation events limit? For example from 3 to 4. For this it will need to search code in whole project what responsibility for it. Also, if I didn't know nothing about validation, number 3 will be for me incomprehensible attribute. Please check validation_event model, there is should be constant where is assigned default validation limit and please change number 3 to this constant

(and yes, I know that I am too used numbers instead constants and this is also my fall :) )

@vohmar vohmar merged commit a580c22 into master May 17, 2022
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.

Refactor: prevent deprecated validation events in database
3 participants