mirror of
https://github.com/django/django.git
synced 2024-12-01 15:42:04 +01:00
Fixed Oracle regression in last_executed_query() with unicode strings
The regression was likely caused by the fix in #19606 which adjusted Oracle's unicode detection, though it seems this would have been an issue in some configurations even before.
This commit is contained in:
parent
09fcb70c80
commit
ce094e570e
@ -270,7 +270,8 @@ WHEN (new.%(col_name)s IS NULL)
|
|||||||
if six.PY3:
|
if six.PY3:
|
||||||
return cursor.statement
|
return cursor.statement
|
||||||
else:
|
else:
|
||||||
return cursor.statement.decode("utf-8")
|
query = cursor.statement
|
||||||
|
return query if isinstance(query, unicode) else query.decode("utf-8")
|
||||||
|
|
||||||
def last_insert_id(self, cursor, table_name, pk_name):
|
def last_insert_id(self, cursor, table_name, pk_name):
|
||||||
sq_name = self._get_sequence_name(table_name)
|
sq_name = self._get_sequence_name(table_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user