mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-17 09:12:18 -06:00
* Add message field to ObjectChange model * Set max length on changelog message * Enable changelog messages for single object operations * Fix tests * Add changelog message support for bulk edit & bulk delete * Cosmetic improvements to form fields * Fix bulk operation templates * Add message support for bulk import/update * Add REST API support for changelog messages (WIP) * Fix changelog_message assignment * Enable changelog message support for bulk deletions * Add documentation * Fix changelog message support for VirtualChassis * Add ChangeLoggingMixin to necesssary model forms * Introduce get_random_string() utility function for tests * Incorporate changelog messages for object view tests * Incorporate changelog messages for object bulk view tests * Add missing mixins for changelog message support * Tweak test to generate expected number of change records * Finish adding tests for changelog message functionality * Misc cleanup * Fixes #19956: Prevent duplicate deletion records from cascading deletions * Tweak bulk deletion test to work around cascading deletions issue * Correct API URL
This commit is contained in:
@@ -3702,7 +3702,6 @@ class VirtualChassisView(generic.ObjectView):
|
||||
class VirtualChassisCreateView(generic.ObjectEditView):
|
||||
queryset = VirtualChassis.objects.all()
|
||||
form = forms.VirtualChassisCreateForm
|
||||
template_name = 'dcim/virtualchassis_add.html'
|
||||
|
||||
|
||||
@register_model_view(VirtualChassis, 'edit')
|
||||
@@ -3750,6 +3749,7 @@ class VirtualChassisEditView(ObjectPermissionRequiredMixin, GetReturnURLMixin, V
|
||||
formset = VCMemberFormSet(request.POST, queryset=members_queryset)
|
||||
|
||||
if vc_form.is_valid() and formset.is_valid():
|
||||
virtual_chassis._changelog_message = vc_form.cleaned_data.pop('changelog_message', '')
|
||||
|
||||
with transaction.atomic(using=router.db_for_write(Device)):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user