diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2016-05-30 23:03:06 +0200 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2016-05-30 23:03:06 +0200 |
commit | 7035bcd928028f04f03f1aa7ac8675bfb80b975f (patch) | |
tree | e9b111de9a41a735e8d78c37e263b2bfa63c51ee | |
parent | f06185a3b22261231d7ca20c3aa5baf9c01756dd (diff) | |
download | raven-7035bcd928028f04f03f1aa7ac8675bfb80b975f.tar.gz |
Fixed a bug with empty params in query crumbs
-rw-r--r-- | CHANGES | 6 | ||||
-rw-r--r-- | raven/contrib/django/client.py | 7 |
2 files changed, 11 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Version 5.20.0 +-------------- + +* fixed an error that could cause certain SQL queries to fail to + record as breadcrumbs if no parameters were supplied. + Version 5.19.0 -------------- diff --git a/raven/contrib/django/client.py b/raven/contrib/django/client.py index 77e23d2..ad2f6e4 100644 --- a/raven/contrib/django/client.py +++ b/raven/contrib/django/client.py @@ -51,8 +51,11 @@ def format_sql(sql, params): if isinstance(params, dict): conv = _FormatConverter(params) - sql = sql % conv - params = conv.params + if params: + sql = sql % conv + params = conv.params + else: + params = () for param in params or (): if param is None: |