Browse files

Fixed a call to .using() that didn't make it into one of the model-va…

…lidation branch merges.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
jkocherhans committed Jan 5, 2010
1 parent bcef283 commit 33afa13af56da3231a6a3c008babeec2e470aaeb
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/db/models/fields/
@@ -473,7 +473,7 @@ def create(self, **kwargs):
if not rel.through._meta.auto_created:
opts = through._meta
raise AttributeError, "Cannot use create() on a ManyToManyField which specifies an intermediary model. Use %s.%s's Manager instead." % (opts.app_label, opts.object_name)
- new_obj = super(ManyRelatedManager, self).create(**kwargs)
+ new_obj = super(ManyRelatedManager, self).using(self.instance._state.db).create(**kwargs)
return new_obj
create.alters_data = True

0 comments on commit 33afa13

Please sign in to comment.