#12883: Adding values in a m2m field breaks (_state.db is None instead of "default") ------------------------------------------+--------------------------------- Reporter: IonelMaries | Owner: nobody Status: new | Milestone: Component: Database layer (models, ORM) | Version: SVN Keywords: | Stage: Unreviewed Has_patch: 0 | ------------------------------------------+--------------------------------- {{{ Traceback (most recent call last): File "x.py", line 123, in process_release bla.somem2mfield.add(foo) File "/home/snip/ve/src/django/django/db/models/fields/related.py", line 465, in add self._add_items(self.source_field_name, self.target_field_name, *objs) File "/home/snip/ve/src/django/django/db/models/fields/related.py", line 525, in _add_items (obj, self.instance._state.db, obj._state.db)) ValueError: Cannot add "<Foo: Foo object>": instance is on database "None", value is is on database "default" }}}
I don't understand why this happens. I don't have any explicit "using" anywhere in my code. -- Ticket URL: <http://code.djangoproject.com/ticket/12883> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.