mirror of
https://github.com/django/django.git
synced 2025-06-05 03:29:12 +00:00
magic-removal: Fixes #1459 -- 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:
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_table, source_col_name,
|
||||||
target_col_name, ",".join(['%s'] * len(new_ids))),
|
target_col_name, ",".join(['%s'] * len(new_ids))),
|
||||||
[source_pk_val] + list(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)])
|
existing_ids = set([row[0] for row in cursor.fetchmany(cursor.rowcount)])
|
||||||
else:
|
else:
|
||||||
existing_ids = set()
|
existing_ids = set()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user