Ticket #1624: executemany_arguments.diff

File executemany_arguments.diff, 1.0 KB (added by Antti Kaihola, 19 years ago)

adds default value for the params argument in debug and mysql cursor wrappers

  • django/db/backends/util.py

     
    1717                'time': "%.3f" % (stop - start),
    1818            })
    1919
    20     def executemany(self, sql, param_list):
     20    def executemany(self, sql, param_list=[]):
    2121        start = time()
    2222        try:
    2323            return self.cursor.executemany(sql, param_list)
  • django/db/backends/mysql/base.py

     
    3333            self.cursor.execute("SHOW WARNINGS")
    3434            raise Database.Warning, "%s: %s" % (w, self.cursor.fetchall())
    3535
    36     def executemany(self, sql, param_list):
     36    def executemany(self, sql, param_list=[]):
    3737        try:
    3838            return self.cursor.executemany(sql, param_list)
    3939        except Database.Warning:
Back to Top