aboutsummaryrefslogtreecommitdiffstats
path: root/debug_toolbar/panels/sql
diff options
context:
space:
mode:
Diffstat (limited to 'debug_toolbar/panels/sql')
-rw-r--r--debug_toolbar/panels/sql/panel.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/debug_toolbar/panels/sql/panel.py b/debug_toolbar/panels/sql/panel.py
index cae5214..b7a9e4c 100644
--- a/debug_toolbar/panels/sql/panel.py
+++ b/debug_toolbar/panels/sql/panel.py
@@ -198,9 +198,8 @@ class SQLPanel(Panel):
query['stacktrace'] = render_stacktrace(query['stacktrace'])
i += 1
- if not trace_colors.get(query['stacktrace']):
- c = colors.next()
- trace_colors[query['stacktrace']] = c
+ if query['stacktrace'] not in trace_colors:
+ trace_colors[query['stacktrace']] = colors.next()
query['trace_color'] = trace_colors[query['stacktrace']]
if trans_id: