mirror of
https://github.com/django/django.git
synced 2025-07-04 09:49:12 +00:00
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
This commit is contained in:
parent
8ceeb6d8cb
commit
0b57189aa2
@ -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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user