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

Avoid runnning validation during Order#record_ip_address #3075

Closed
elia opened this issue Feb 4, 2019 · 1 comment
Closed

Avoid runnning validation during Order#record_ip_address #3075

elia opened this issue Feb 4, 2019 · 1 comment
Labels
type:bug Error, flaw or fault

Comments

@elia
Copy link
Member

elia commented Feb 4, 2019

Order#record_ip_address shouldn't risk blocking the request in case a validation check is not met. Instead of update_attributes! I'd suggest using update_column.

Solidus Version:
Found in 2.4, latest code seems to behaving the same way.

To Reproduce
Hard to reproduce, but got notifications for exceptions due to the validation on email.

Current behavior
Raises an exception if the order is invalid.

Expected behavior
No unrelated exceptions raised when recording the ip.

Additional context
related: #2068

@kennyadsl
Copy link
Member

That PR's commit message is Avoid running validations in current_order but I think it refers to running validation only when we need to update the order - if IP is not changed it won't.

At the moment I can't see any cons skipping validation there. So 👍 for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error, flaw or fault
Projects
None yet
Development

No branches or pull requests

3 participants