Opened 2 years ago
Closed 2 years ago
#33972 closed Bug (worksforme)
Copying model instances of many-to-many field doesn't apply changes to database
Description ¶
In section 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.
Note:
See TracTickets
for help on using tickets.
This passing test shows it does:
You probably need to get some help from support channels.