Skip to content

Commit

Permalink
fix: Use optional env variable for the raw data API
Browse files Browse the repository at this point in the history
  • Loading branch information
robsavoye committed Sep 8, 2023
1 parent 473eaa6 commit d0f24cb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion osm_fieldwork/make_data_extract.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,11 @@ def __init__(self,

# Use a persistant connect, better for multiple requests
self.session = requests.Session()
self.url = "https://raw-data-api0.hotosm.org/v1"
url = os.getenv('RAWDATA_API')
if not url:
self.url = "https://raw-data-api0.hotosm.org/v1"
else:
self.url = url
self.headers = {"accept": "application/json", "Content-Type": "application/json"}
else:
log.info("Opening database connection to: %s" % dbhost)
Expand Down

0 comments on commit d0f24cb

Please sign in to comment.