-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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 partial or missing address exceptions #3180
Fix partial or missing address exceptions #3180
Conversation
4e0bf84
to
e0c6be8
Compare
post[:address][:street] = address[:address1].match(/\D+/)[0].strip if address[:address1] | ||
post[:address][:number] = address[:address1].match(/\d+/)[0] if address[:address1] | ||
post[:address][:street] = address[:address1].match(/\D+/)[0].strip if address[:address1].match(/\D+/) && address[:address1] | ||
post[:address][:number] = address[:address1].match(/\d+/)[0] if address[:address1].match(/\d+/) && address[:address1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the check that address[:address1]
is truthy occur before the match?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
e0c6be8
to
a20d4fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
a20d4fa
to
bfeef0c
Compare
NilClass errors noted in attempted transactions for DLocal and Mundipagg gateways, due to absent objects. Made small fixes that will avoid this error. Mundipagg Unit tests: 17 tests, 76 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed DLocal Unit tests: 16 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Closes activemerchant#3180
bfeef0c
to
2541ce5
Compare
NilClass errors noted in attempted transactions for DLocal and Mundipagg gateways, due to absent objects. Made small fixes that will avoid this error. Mundipagg Unit tests: 17 tests, 76 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed DLocal Unit tests: 16 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed Closes activemerchant#3180
NilClass errors noted in attempted transactions for DLocal and Mundipagg gateways,
due to absent objects. Made small fixes that will avoid this error.
Mundipagg Unit tests:
17 tests, 76 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed
DLocal Unit tests:
16 tests, 48 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
100% passed