17170 Add ability to add contacts to multiple contact groups (#18885)

* 17170 Allow multiple Group assignments for Contacts

* 17170 update docs

* 17170 update api, detail view, graphql

* 17170 fixes

* 17170 fixes

* 17170 fixes

* 17170 fixes

* 17170 fixes

* 17170 fixes

* 17170 fix bulk import

* 17170 test fixes

* 17170 test fixes

* 17170 test fixes

* 17178 review changes

* 17178 review changes

* 17178 review changes

* 17178 review changes

* 17178 review changes

* 17178 review changes

* 17170 update migration

* 17170 bulk edit form
This commit is contained in:
Arthur Hanson
2025-03-18 11:05:02 -07:00
committed by GitHub
parent d4f8cb72aa
commit af5ec19430
18 changed files with 204 additions and 78 deletions

View File

@@ -170,7 +170,7 @@ class ContactTest(APIViewTestCases.APIViewTestCase):
model = Contact
brief_fields = ['description', 'display', 'id', 'name', 'url']
bulk_update_data = {
'group': None,
'groups': [],
'comments': 'New comments',
}
@@ -183,20 +183,22 @@ class ContactTest(APIViewTestCases.APIViewTestCase):
)
contacts = (
Contact(name='Contact 1', group=contact_groups[0]),
Contact(name='Contact 2', group=contact_groups[0]),
Contact(name='Contact 3', group=contact_groups[0]),
Contact(name='Contact 1'),
Contact(name='Contact 2'),
Contact(name='Contact 3'),
)
Contact.objects.bulk_create(contacts)
contacts[0].groups.add(contact_groups[0])
contacts[1].groups.add(contact_groups[0])
contacts[2].groups.add(contact_groups[0])
cls.create_data = [
{
'name': 'Contact 4',
'group': contact_groups[1].pk,
'groups': [contact_groups[1].pk],
},
{
'name': 'Contact 5',
'group': contact_groups[1].pk,
},
{
'name': 'Contact 6',