Browse Source

Can't use executemany() here.

tags/v1.0^2
Ben Kurtovic 10 years ago
parent
commit
b6fabc54ec
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      bitshift/database/__init__.py

+ 3
- 2
bitshift/database/__init__.py View File

@@ -103,8 +103,9 @@ class Database(object):
WHERE codelet_id = ?"""

with self._conn.cursor(oursql.DictCursor) as dict_cursor:
dict_cursor.executemany(query, [(id,) for id in ids])
for row in dict_cursor.fetchone():
for codelet_id in ids:
dict_cursor.execute(query, (codelet_id,))
row = dict_cursor.fetchall()[0]
codelet_id = row["codelet_id"]
if row["origin_url_base"]:
url = row["codelet_url"]


Loading…
Cancel
Save