Skip to content

Commit a5a7a81

Browse files
committed
Recording is a contextvars now, it should be set with .set()
1 parent a3e8cc0 commit a5a7a81

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

debug_toolbar/panels/templates/panel.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def _store_template_info(self, sender, **kwargs):
118118
value.model._meta.label,
119119
)
120120
else:
121-
recording(False)
121+
recording.set(False)
122122
try:
123123
saferepr(value) # this MAY trigger a db query
124124
except SQLQueryTriggered:
@@ -130,7 +130,7 @@ def _store_template_info(self, sender, **kwargs):
130130
else:
131131
temp_layer[key] = value
132132
finally:
133-
recording(True)
133+
recording.set(True)
134134
pformatted = pformat(temp_layer)
135135
self.pformat_layers.append((context_layer, pformatted))
136136
context_list.append(pformatted)

0 commit comments

Comments
 (0)