﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
33972	Copying model instances of many-to-many field doesn't apply changes to database	Eido Askayo	nobody	"In section [https://docs.djangoproject.com/en/4.0/topics/db/queries/#copying-model-instances Copying model instances], the following code is shown:
{{{
entry = Entry.objects.all()[0] # some previous entry
old_authors = entry.authors.all()
entry.pk = None
entry._state.adding = True
entry.save()
entry.authors.set(old_authors)
}}}

{{{entry.save()}}} applies changes to database, but {{{entry.authors.set(old_authors)}}} doesn't.
"	Bug	closed	Documentation	4.0	Normal	worksforme			Unreviewed	0	0	0	0	0	0
