diff --git a/lbry/lbry/wallet/server/db/reader.py b/lbry/lbry/wallet/server/db/reader.py index 4ff224f4c..be0152b9a 100644 --- a/lbry/lbry/wallet/server/db/reader.py +++ b/lbry/lbry/wallet/server/db/reader.py @@ -168,7 +168,7 @@ def execute_query(sql, values) -> List: return context.db.execute(sql, values).fetchall() except sqlite3.OperationalError as err: plain_sql = interpolate(sql, values) - if not context.is_tracking_metrics: + if context.is_tracking_metrics: context.metric['execute_query'][-1]['sql'] = plain_sql if str(err) == "interrupted": context.log.warning("interrupted slow sqlite query:\n%s", plain_sql)