Skip to content
Snippets Groups Projects
Unverified Commit a4745313 authored by Bucknell, Mary S.'s avatar Bucknell, Mary S. Committed by GitHub
Browse files

Merge pull request #1364 from mbucknell/fix_camera

Try to fetch camera meta data if meta data is absent or empty.
parents 292d3ae1 ccd9122c
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,7 @@ def get_monitoring_location_camera_details(site_no):
:return list of dictionaries with keys for links to med_video, small_video, and details
:rtype list
"""
if 'MONITORING_LOCATION_CAMERA_METADATA' not in app.config:
if not app.config.get('MONITORING_LOCATION_CAMERA_METADATA', {}):
app.config['MONITORING_LOCATION_CAMERA_METADATA'] = fetch_camera_metadata().get('data', [])
ml_camera_data = list(filter(lambda x: x['usgsSiteNumber'] == site_no,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment