1
0
mirror of https://github.com/django/django.git synced 2025-04-08 15:36:47 +00:00

magic-removal: Fixes -- Modified the way the row count is compared to accommodate SQLite. Thanks, Malcolm Tredinnick.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2478 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2006-03-03 10:20:35 +00:00
parent eb4c05e031
commit cb0a57fc8b

@ -221,7 +221,7 @@ def _add_m2m_items(rel_manager_inst, managerclass, rel_model, join_table, source
(target_col_name, join_table, source_col_name,
target_col_name, ",".join(['%s'] * len(new_ids))),
[source_pk_val] + list(new_ids))
if cursor.rowcount is not None and cursor.rowcount > 0:
if cursor.rowcount is not None and cursor.rowcount != 0:
existing_ids = set([row[0] for row in cursor.fetchmany(cursor.rowcount)])
else:
existing_ids = set()