Skip to content

Commit 9f125bd

Browse files
committed
chore: ruff B012
1 parent efbff9a commit 9f125bd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

debug_toolbar/panels/sql/tracking.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,11 @@ def _record(self, method, sql, params):
237237
)
238238

239239
# Skip recording if query includes DDT models.
240-
if not allow_ddt_models_tracking.get() and any(
240+
if allow_ddt_models_tracking.get() or not any(
241241
table in sql for table in DDT_MODELS
242242
):
243-
return
244-
245-
# We keep `sql` to maintain backwards compatibility
246-
self.logger.record(**kwargs)
243+
# We keep `sql` to maintain backwards compatibility
244+
self.logger.record(**kwargs)
247245

248246
def callproc(self, procname, params=None):
249247
return self._record(super().callproc, procname, params)

0 commit comments

Comments
 (0)