summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-04-10 21:41:34 +0000
committerBoulder Sprinters <boulder-sprinters@djangoproject.com>2007-04-10 21:41:34 +0000
commit0b57189aa27862f2b0a09f7e62e9a3a70ddcb328 (patch)
treed9dc51a342821c0b82196a6ed09c9f7c6c612247
parent8ceeb6d8cb5933ae518b2c75338decd2fc1bc97b (diff)
boulder-oracle-sprint: Fixed many_to_many and m2m_recursive test case failures.
Thanks, Ian Kelly. DB code was relying on cursor.rowcount, which has different behavior on Oracle and isn't very consistent elsewhere. git-svn-id: http://code.djangoproject.com/svn/django/branches/boulder-oracle-sprint@4994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/db/models/fields/related.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index fad9c164c1..c336585ac9 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -335,10 +335,7 @@ def create_many_related_manager(superclass):
(target_col_name, self.join_table, source_col_name,
target_col_name, ",".join(['%s'] * len(new_ids))),
[self._pk_val] + list(new_ids))
- 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()
+ existing_ids = set([row[0] for row in cursor.fetchall()])
# Add the ones that aren't there already
for obj_id in (new_ids - existing_ids):