mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-27 02:48:38 -06:00
17178 review changes
This commit is contained in:
parent
78e0a5af3f
commit
5a5a7f3213
@ -195,6 +195,7 @@ class ContactTest(APIViewTestCases.APIViewTestCase):
|
||||
cls.create_data = [
|
||||
{
|
||||
'name': 'Contact 4',
|
||||
'groups': [contact_groups[1].pk],
|
||||
},
|
||||
{
|
||||
'name': 'Contact 5',
|
||||
|
@ -215,16 +215,17 @@ class ContactTestCase(ViewTestCases.PrimaryObjectViewTestCase):
|
||||
|
||||
cls.csv_data = (
|
||||
"name",
|
||||
"groups",
|
||||
"Contact 4",
|
||||
"Contact 5",
|
||||
"Contact 6",
|
||||
)
|
||||
|
||||
cls.csv_update_data = (
|
||||
"id,name,comments",
|
||||
f"{contacts[0].pk},Contact Group 7,New comments 7",
|
||||
f"{contacts[1].pk},Contact Group 8,New comments 8",
|
||||
f"{contacts[2].pk},Contact Group 9,New comments 9",
|
||||
"id,name,groups,comments",
|
||||
f'{contacts[0].pk},Contact 7,"Contact Group 1,Contact Group 2",New comments 7',
|
||||
f'{contacts[1].pk},Contact 8,"Contact Group 1",New comments 8',
|
||||
f'{contacts[2].pk},Contact 9,"Contact Group 1",New comments 9',
|
||||
)
|
||||
|
||||
cls.bulk_edit_data = {
|
||||
|
@ -183,14 +183,12 @@ class ContactGroupListView(generic.ObjectListView):
|
||||
class ContactGroupView(GetRelatedModelsMixin, generic.ObjectView):
|
||||
queryset = ContactGroup.objects.all()
|
||||
|
||||
"""
|
||||
def get_extra_context(self, request, instance):
|
||||
groups = instance.get_descendants(include_self=True)
|
||||
|
||||
return {
|
||||
'related_models': self.get_related_models(request, groups),
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
@register_model_view(ContactGroup, 'add', detail=False)
|
||||
|
Loading…
Reference in New Issue
Block a user