'ManyToManyDescriptor' object is not callable while copying M2M relation

383 Views Asked by At

I have this relation defined in x\research.py file.

research_groups = models.ManyToManyField(ResearchGroup, related_name='researchs', blank=True,
                                             through='ResearchResearchGroups')

Then i want copy it to y\research.py file with

research.research_groups.set(Research.research_groups.all())

And while im trying to use it i get

'ManyToManyDescriptor' object is not callable

How can i handle assigning m2m relation to another place?

0

There are 0 best solutions below