Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

magic-removal: Fixes #1459 -- Modified the way the row count is compa…

…red to accommodate SQLite. Thanks, Malcolm Tredinnick.

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2478 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit cb0a57fc8b429c1d3c2146984b795b8e31f32b34 1 parent eb4c05e
@freakboy3742 freakboy3742 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/fields/related.py
View
2  django/db/models/fields/related.py
@@ -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()
Please sign in to comment.
Something went wrong with that request. Please try again.