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

Validate that Refunds have an associated Payment #2130

Conversation

melissacarbone
Copy link

…payment

Without this change, when a refund is saved with no payment it raises:
NoMethodError: undefined method `credit_allowed' for nil:NilClass
from:
app/models/spree/refund.rb:77:in `amount_is_less_than_or_equal_to_allowed_amount'

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

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

LGTM

@melissacarbone melissacarbone force-pushed the ensure_validation_errors_are_returned_for_refund branch from f66ee93 to 256cf4a Compare August 17, 2017 17:21
Copy link
Contributor

@jhawthorn jhawthorn left a comment

Choose a reason for hiding this comment

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

Thank you

@jhawthorn jhawthorn merged commit d1441be into solidusio:master Aug 21, 2017
@jhawthorn jhawthorn changed the title Ensure validation error is returned when creating a refund without a … Validate that Refunds have an associated Payment Oct 2, 2017
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.

4 participants