Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…lidation branch merges.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12106 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 33afa13af56da3231a6a3c008babeec2e470aaeb 1 parent bcef283
@jkocherhans jkocherhans 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
@@ -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)
self.add(new_obj)
return new_obj
create.alters_data = True
Please sign in to comment.
Something went wrong with that request. Please try again.