From 68212d7fcb291eac01c6eae88b58592e67b4c9d2 Mon Sep 17 00:00:00 2001 From: trampfox Date: Tue, 2 Jul 2019 14:24:18 +0200 Subject: [PATCH] Fix flake errors. --- grafana_dashboards/components/templates.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/grafana_dashboards/components/templates.py b/grafana_dashboards/components/templates.py index 1d2066d..261c679 100644 --- a/grafana_dashboards/components/templates.py +++ b/grafana_dashboards/components/templates.py @@ -121,11 +121,11 @@ def gen_json_from_data(self, data, context): 'value': '$__all' if data['current'] == 'All' else data['current'] } if 'options' in data: - template_json['options'] = [{'text': option, 'value': option} for option + template_json['options'] = [{'text': option, 'value': option} for option in (data['options'])] - if 'includeAll' in data and data['includeAll'] == True: + if 'includeAll' in data and data['includeAll'] is True: all_option = {'selected': True, 'text': 'All', 'value': '$__all'} - template_json.setdefault('options', []).insert(0,all_option) + template_json.setdefault('options', []).insert(0, all_option) return template_json