Adds TenantGroup.comments to the required locations

- [x] 1. Add the field to the model class
- [x] 2. Generate and run database migrations
- [NA] 3. Add validation logic to clean()
- [NA] 4. Update relevant querysets
- [x] 5. Update API serializer
- [x] 6. Add fields to forms
    - [x] tenancy.forms.model_forms, create/edit (e.g. model_forms.py)
    - [x] tenancy.forms.bulk_edit, bulk edit
    - [x] tenancy.forms.bulk_import, CSV import
    - [NA] filter (UI and API)
- [x] 7. Extend object filter set
- [x] 8. Add column to object table
- [x] 9. Update the SearchIndex
- [x] 10. Update the UI templates
- [x] 11. Create/extend test cases
    - [NA] models
    - [x] views
    - [NA] forms
    - [x] filtersets
    - [x] api
- [NA] 12. Update the model's documentation
This commit is contained in:
Jason Novinger
2025-03-11 11:07:05 -05:00
parent b8352260ee
commit 157df20ad4
11 changed files with 54 additions and 19 deletions

View File

@@ -21,6 +21,7 @@ class TenantGroupTest(APIViewTestCases.APIViewTestCase):
brief_fields = ['_depth', 'description', 'display', 'id', 'name', 'slug', 'tenant_count', 'url']
bulk_update_data = {
'description': 'New description',
'comments': 'New Comment',
}
@classmethod
@@ -28,12 +29,17 @@ class TenantGroupTest(APIViewTestCases.APIViewTestCase):
parent_tenant_groups = (
TenantGroup.objects.create(name='Parent Tenant Group 1', slug='parent-tenant-group-1'),
TenantGroup.objects.create(name='Parent Tenant Group 2', slug='parent-tenant-group-2'),
TenantGroup.objects.create(
name='Parent Tenant Group 2', slug='parent-tenant-group-2', comments='Parent Group 2 comment',
),
)
TenantGroup.objects.create(name='Tenant Group 1', slug='tenant-group-1', parent=parent_tenant_groups[0])
TenantGroup.objects.create(name='Tenant Group 2', slug='tenant-group-2', parent=parent_tenant_groups[0])
TenantGroup.objects.create(name='Tenant Group 3', slug='tenant-group-3', parent=parent_tenant_groups[0])
TenantGroup.objects.create(
name='Tenant Group 3', slug='tenant-group-3', parent=parent_tenant_groups[0],
comments='Tenant Group 3 comment'
)
cls.create_data = [
{
@@ -50,6 +56,7 @@ class TenantGroupTest(APIViewTestCases.APIViewTestCase):
'name': 'Tenant Group 6',
'slug': 'tenant-group-6',
'parent': parent_tenant_groups[1].pk,
'comments': 'Tenant Group 6 comment',
},
]