diff --git a/django/db/backends/oracle/base.py b/django/db/backends/oracle/base.py index 6af7e8e249..ee0d86a53e 100644 --- a/django/db/backends/oracle/base.py +++ b/django/db/backends/oracle/base.py @@ -71,7 +71,7 @@ class FormatStylePlaceholderCursor(Database.Cursor): def execute(self, query, params=None): if params is None: params = [] - args = [(':arg%s' % i) for i in range(num_params)] + args = [(':arg%s' % i) for i in range(len(params))] query = query % tuple(args) # cx can not execute the query with the closing ';'