Direct assignment to the forward side of a many-to-many set is deprecated Fixing this issue.
This commit is contained in:
Awais Qureshi
2019-12-27 16:35:06 +05:00
parent fe1f69741e
commit 804a84f9cf

View File

@@ -148,5 +148,5 @@ class Command(BaseCommand):
)
)
user.groups = new_groups
user.groups.set(new_groups)
user.save()