redcross / smoke-alarm-portal

Red Cross web portal accepting free smoke alarm installation requests
https://getasmokealarm.org/
Other
7 stars 20 forks source link

Add lat/long to Request model, rework ID implementation #271

Closed frankduncan closed 5 years ago

frankduncan commented 6 years ago

This is a working PR that imports the changes from #221.

Adds latitude/longitude to DB and does a geocode lookup from google maps api to get the location and put in database.

Of note is that the code to loop over serial's was removed to prevent an infinite loop (#159), but doesn't seem to be replaced with anything preventing duplicate serials as using shortid's was found not to be optimal.

Not sure what the solution here is, since this will come up as a race condition.

kfogel commented 6 years ago

Hey, @frankduncan. I responded to your questions re Google Maps API key in Zulip. See the thread here. I think I might have fixed the thing that was causing a problem -- I thought I had enabled geocoding and geolocation before, but it looks like I hadn't done it in the right way, and now I (hope I) have.

frankduncan commented 6 years ago

@kfogel I've updated the description, and things are now working. Take a look when you have a chance :)