diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 7e3591f60c..8d6b48e52a 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -443,17 +443,12 @@ class FormatStylePlaceholderCursor: # values. It can be used only in single query execute() because # executemany() shares the formatted query with each of the params # list. e.g. for input params = [0.75, 2, 0.75, 'sth', 0.75] - # params_dict = { - # (2, ): ':arg2', - # (0.75, ): ':arg1', - # ('sth', ): ':arg0', - # } + # params_dict = {0.75: ':arg0', 2: ':arg1', 'sth': ':arg2'} # args = [':arg0', ':arg1', ':arg0', ':arg2', ':arg0'] # params = {':arg0': 0.75, ':arg1': 2, ':arg2': 'sth'} - params = [(param, type(param)) for param in params] params_dict = {param: ':arg%d' % i for i, param in enumerate(set(params))} args = [params_dict[param] for param in params] - params = {value: key[0] for key, value in params_dict.items()} + params = {value: key for key, value in params_dict.items()} query = query % tuple(args) else: # Handle params as sequence