Fix logger when self.cursor.query is None
This commit is contained in:
1 parent
1f9ee4ec7b
commit
e3bd17d9bb
1 file changed
+1
-1
@@ -282,7 +282,7 @@ class Cursor(CursorInterface):
|
||||
res = self.cursor.execute(sql)
|
||||
except:
|
||||
logger = logging.getLogger('sql')
|
||||
logger.error('Wrong SQL: ' + self.cursor.query)
|
||||
logger.error('Wrong SQL: ' + (self.cursor.query or ''))
|
||||
raise
|
||||
if self.sql_log:
|
||||
res_from = RE_FROM.match(sql.lower())
|
||||
|
||||
Reference in new issue
Block a user