Permalink
Browse files

Refs #23919 -- Removed Python 2 workaround for hashing Oracle params …

…(refs #27632).
  • Loading branch information...
felixxm authored and timgraham committed Jan 20, 2017
1 parent fedda6d commit bf1c9570270b46e9e92b256fb9be394258029bbf
Showing with 2 additions and 7 deletions.
  1. +2 −7 django/db/backends/oracle/base.py
@@ -443,17 +443,12 @@ def _fix_for_params(self, query, params, unify_by_values=False):
# 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, <type 'int'>): ':arg2',
- # (0.75, <type 'float'>): ':arg1',
- # ('sth', <type 'str'>): ':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

0 comments on commit bf1c957

Please sign in to comment.