django2.2: remove direct assignments to many-to-many fields

This commit is contained in:
2019-10-06 02:15:18 +02:00
parent 97c316b62e
commit 99c8d95443
5 changed files with 37 additions and 31 deletions

View File

@ -62,7 +62,7 @@ class ComTest(TestCase):
self.com_group = RealGroup.objects.filter(
id=settings.SITH_GROUP_COM_ADMIN_ID
).first()
self.skia.groups = [self.com_group]
self.skia.groups.set([self.com_group])
self.skia.save()
self.client.login(username=self.skia.username, password="plop")