1
0
mirror of https://github.com/django/django.git synced 2025-07-05 18:29:11 +00:00

[soc2009/multidb] Made the remove method on many to many related managers use the default database for transactions. This will eventually need to be changed as a part of a larger refactor of many to many fields

git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/multidb@10920 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Alex Gaynor 2009-06-03 21:25:20 +00:00
parent 7c797e138d
commit dc4eaff121

View File

@ -502,7 +502,8 @@ def create_many_related_manager(superclass, through=False):
(self.join_table, source_col_name, (self.join_table, source_col_name,
target_col_name, ",".join(['%s'] * len(old_ids))), target_col_name, ",".join(['%s'] * len(old_ids))),
[self._pk_val] + list(old_ids)) [self._pk_val] + list(old_ids))
transaction.commit_unless_managed() # TODO
transaction.commit_unless_managed(using=DEFAULT_DB_ALIAS)
def _clear_items(self, source_col_name): def _clear_items(self, source_col_name):
# source_col_name: the PK colname in join_table for the source object # source_col_name: the PK colname in join_table for the source object