Skip to content
Snippets Groups Projects
Commit 6a84fb33 authored by Bjarke Madsen's avatar Bjarke Madsen
Browse files

lint

parent 8ae8b1ff
No related branches found
No related tags found
No related merge requests found
......@@ -54,6 +54,8 @@ def find_dashboard(request: TokenRequest, title):
# Searches Grafana for a dashboard
# matching the title of the provided dashboard.
def _search_dashboard(request: TokenRequest, dashboard: Dict, folder_id=None):
try:
r = request.get('api/search', params={
......@@ -63,7 +65,7 @@ def _search_dashboard(request: TokenRequest, dashboard: Dict, folder_id=None):
if len(r) >= 1:
for dash in r:
if folder_id:
if folder_id != dash['folderId']:
if folder_id != dash.get('folderId'):
continue
if dash['title'] == dashboard['title']:
definition = _get_dashboard(request, dash['uid'])
......
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