Skip to content

Commit c1d46d2

Browse files
Don't let bad countries block forms.
1 parent fb75d76 commit c1d46d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pegasus/forms/petition.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ def self.process(data)
3333
result = {}
3434

3535
location = data['zip_code_s'] || data['country_s']
36-
result['location_p'] = geocode_address(location) unless location.nil_or_empty?
36+
begin
37+
result['location_p'] = geocode_address(location) unless location.nil_or_empty?
38+
rescue
39+
end
3740

3841
result
3942
end

0 commit comments

Comments
 (0)