From 3a001078172fc56b83612d20b7ef2c649569b39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20J=C3=BAnior?= Date: Tue, 28 Aug 2012 09:52:35 -0300 Subject: [PATCH] Added constraint for None parameters. `Execute` methods accept `None` as params and that wasn't supported by the tracking module, that was passing into to a map function. --- debug_toolbar/utils/tracking/db.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debug_toolbar/utils/tracking/db.py b/debug_toolbar/utils/tracking/db.py index 4d8709047..a739232ca 100644 --- a/debug_toolbar/utils/tracking/db.py +++ b/debug_toolbar/utils/tracking/db.py @@ -80,6 +80,9 @@ def _quote_params(self, params): if isinstance(params, dict): return dict((key, self._quote_expr(value)) for key, value in params.iteritems()) + elif params is None: + return [] + return map(self._quote_expr, params) def execute(self, sql, params=()):