aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debug_toolbar/panels/sql.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/debug_toolbar/panels/sql.py b/debug_toolbar/panels/sql.py
index 9dfee71..0fac42b 100644
--- a/debug_toolbar/panels/sql.py
+++ b/debug_toolbar/panels/sql.py
@@ -169,7 +169,8 @@ class SQLDebugPanel(DebugPanel):
if last_trans_id:
self._queries[i-1][1]['ends_trans'] = True
trans_ids[alias] = trans_id
- query['starts_trans'] = True
+ if trans_id:
+ query['starts_trans'] = True
if trans_id:
query['in_trans'] = True