faradayio / lodging

A carbon model
GNU Affero General Public License v3.0
2 stars 2 forks source link

state is used even if country != US #4

Closed seamusabshere closed 11 years ago

seamusabshere commented 11 years ago

for example:

http://impact.brighterplanet.com/lodgings?city=Ottawa&country=CA&state=ontario&rooms=1&timeframe=2012-01-01/2013-01-01

matches ontario to AZ and (!!) uses AZ electricity mix!

ihough commented 11 years ago

Fixed by 70476c39e5b2a0805b43447af7197e380ac23c10

Note that country=CA&state=ontario will still be interpreted as country: CA, state: AZ, but now Lodging will use the CA rather than AZ electricity mix because country != US

Also note that if state is provided without country Lodging will assume country: US - so state=ontario will be interpreted as country: US, state: AZ and Lodging will use the AZ electricity mix.