Skip to content

Improve bulk handling of empty values#44

Merged
vprigent merged 4 commits intomasterfrom
improve-bulk-handling-of-empty-values
Mar 24, 2025
Merged

Improve bulk handling of empty values#44
vprigent merged 4 commits intomasterfrom
improve-bulk-handling-of-empty-values

Conversation

@vprigent
Copy link
Contributor

No description provided.

def verify_address(address)
return if address.empty?

AddressFinder::V2::Au::Verification.new(q: address, http: http.clone, **args).perform.result || false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

both AU and NZ verification classes here will assign result only if the address is matched.
This means there's not way of knowing if an address is verified and has returned no result or if there's simply no address to verify.
Because of how we currently bulk verify addresses, an empty value within the column gets sent to the API, and results in an error within our reporting.


[![Gem Version](https://badge.fury.io/rb/addressfinder.svg)](http://badge.fury.io/rb/addressfinder)
[![Build Status](https://travis-ci.com/github/AddressFinder/addressfinder-ruby.svg)](https://travis-ci.com/github/AddressFinder/addressfinder-ruby)
[![Build Status](https://github.com/addressfinder/addressfinder-ruby/actions/workflows/ruby.yml/badge.svg?branch=master)](https://github.com/addressfinder/addressfinder-ruby/actions/workflows/ruby.yml/badge.svg?branch=master)
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@vprigent vprigent force-pushed the improve-bulk-handling-of-empty-values branch from bf70816 to 2ff0b31 Compare March 24, 2025 01:21
@vprigent vprigent marked this pull request as ready for review March 24, 2025 02:04
@vprigent vprigent merged commit e2c9c94 into master Mar 24, 2025
28 checks passed
@vprigent vprigent deleted the improve-bulk-handling-of-empty-values branch March 24, 2025 02:14
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.

2 participants