Skip to content
Snippets Groups Projects
Unverified Commit 3093d832 authored by Peekjef72's avatar Peekjef72 Committed by GitHub
Browse files

fixe folder_uid when dashboard has no folder (#176)

parent 42063c77
No related branches found
No related tags found
No related merge requests found
......@@ -260,7 +260,10 @@ def get_folder_id(dashboard, grafana_url, http_post_headers, verify_ssl, client_
folder_uid = dashboard['meta']['folderUid']
except (KeyError):
matches = re.search('dashboards\/f\/(.*)\/.*', dashboard['meta']['folderUrl'])
folder_uid = matches.group(1)
if matches is not None:
folder_uid = matches.group(1)
else:
folder_uid = '0'
if (folder_uid != ""):
print("debug: quering with uid {}".format(folder_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