Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

NoMethodError in Spree::Checkout#edit when address.state == nil #156

Closed
mntmn opened this issue Mar 11, 2018 · 0 comments
Closed

NoMethodError in Spree::Checkout#edit when address.state == nil #156

mntmn opened this issue Mar 11, 2018 · 0 comments

Comments

@mntmn
Copy link

mntmn commented Mar 11, 2018

I'm testing the checkout with Braintree payment and running into this error as a German test customer. The state field of the address is nil, which is valid in this case (German addresses don't have a state):

`Showing /home/mntmn/.bundle/ruby/2.3.0/solidus_paypal_braintree-898eb2cad543/lib/views/frontend/spree/checkout/payment/_paypal_braintree.html.erb where line #40 raised:

undefined method name' for nil:NilClass

The offending line is:

state: '<%= address.state.name %>',

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants