mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-10 03:13:48 +02:00
Adds SiteGroup.comments in 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] dcim.forms.model_forms.LocationForm, create/edit (e.g. model_forms.py)
- [x] dcim.forms.buld_edit.LocationBulkEditForm, bulk edit
- [x] dcim.dorms.bulk_import.LocationImportForm, CSV import
- [x] 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
- [x] 12. Update the model's documentation
This commit is contained in:
@@ -73,7 +73,7 @@ class SiteGroupTestCase(ViewTestCases.OrganizationalObjectViewTestCase):
|
||||
|
||||
# Create three SiteGroups
|
||||
sitegroups = (
|
||||
SiteGroup(name='Site Group 1', slug='site-group-1'),
|
||||
SiteGroup(name='Site Group 1', slug='site-group-1', comments='Still here'),
|
||||
SiteGroup(name='Site Group 2', slug='site-group-2'),
|
||||
SiteGroup(name='Site Group 3', slug='site-group-3'),
|
||||
)
|
||||
@@ -88,24 +88,26 @@ class SiteGroupTestCase(ViewTestCases.OrganizationalObjectViewTestCase):
|
||||
'parent': sitegroups[2].pk,
|
||||
'description': 'A new site group',
|
||||
'tags': [t.pk for t in tags],
|
||||
'comments': 'still here',
|
||||
}
|
||||
|
||||
cls.csv_data = (
|
||||
"name,slug,description",
|
||||
"Site Group 4,site-group-4,Fourth site group",
|
||||
"Site Group 5,site-group-5,Fifth site group",
|
||||
"Site Group 6,site-group-6,Sixth site group",
|
||||
"name,slug,description,comments",
|
||||
"Site Group 4,site-group-4,Fourth site group,",
|
||||
"Site Group 5,site-group-5,Fifth site group,still hear",
|
||||
"Site Group 6,site-group-6,Sixth site group,"
|
||||
)
|
||||
|
||||
cls.csv_update_data = (
|
||||
"id,name,description",
|
||||
f"{sitegroups[0].pk},Site Group 7,Fourth site group7",
|
||||
f"{sitegroups[1].pk},Site Group 8,Fifth site group8",
|
||||
f"{sitegroups[2].pk},Site Group 0,Sixth site group9",
|
||||
"id,name,description,comments",
|
||||
f"{sitegroups[0].pk},Site Group 7,Fourth site group7,",
|
||||
f"{sitegroups[1].pk},Site Group 8,Fifth site group8,when will it end",
|
||||
f"{sitegroups[2].pk},Site Group 0,Sixth site group9,",
|
||||
)
|
||||
|
||||
cls.bulk_edit_data = {
|
||||
'description': 'New description',
|
||||
'comments': 'the end',
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user