Merge remote-tracking branch 'origin/master'

This commit is contained in:
Kyle Gabriel 2020-12-22 20:46:47 -05:00
commit cc150ad523

View file

@ -126,6 +126,8 @@ def get_new_data():
key = 'key {}'.format(app_key)
headers = {'Authorization': key, 'Content-Type': 'application/json'}
response = requests.get(endpoint, headers=headers)
if response.status_code != 200:
logger.info(response.reason)
try:
for each_resp in response.json():
if (not Location.query.filter(Location.datetime == each_resp['time']).first() and