Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

The zipcode is stripping leading zeros #8

Closed
mclejar opened this issue Apr 30, 2015 · 3 comments
Closed

The zipcode is stripping leading zeros #8

mclejar opened this issue Apr 30, 2015 · 3 comments

Comments

@mclejar
Copy link

mclejar commented Apr 30, 2015

Hello,

In a recent update it seems that you have broken the zipcode field. Postal codes that start with 0 are missing the leading 0's. If we query agains postal code we get 0 results.

For example this restaurant in Boston has this for data:

{
"total_entries": 1,
"per_page": 25,
"current_page": 1,
"restaurants": [
{
"id": 106855,
"name": "Nebo",
"address": "520 Atlantic Ave",
"city": "Boston",
"state": "MA",
"area": "Boston / New England",
"postal_code": "2210",
"country": "US",
"phone": "6177236326",
"lat": 42.353772,
"lng": -71.053364,
"price": 2,
"reserve_url": "http://www.opentable.com/single.aspx?rid=106855",
"mobile_reserve_url": "http://mobile.opentable.com/opentable/?restId=106855",
"image_url": "https://www.opentable.com/img/restimages/106855.jpg"
}
]
}

You can see that the postal_code is "2210" when it should be "02210"

Therefore the following query returns 0 results:

https://opentable.herokuapp.com/api/restaurants?name=Nebo&address=520%20Atlantic%20Ave&city=Boston&state=MA&zip=02210

If we take off the zip param it works, but we have code that contains the zip right now.

Thanks!

@sosedoff
Copy link
Owner

Fixed.

@sosedoff
Copy link
Owner

There was an issue with XLS->CSV conversion, nothing to do with code.

@mclejar
Copy link
Author

mclejar commented Apr 30, 2015

Thanks! Figured it was something like that. Actually one of the guys here called that exactly.

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