From 965e78125afd59468a69e01cc87a4a8c5fff47bd Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Thu, 18 Jul 2024 21:44:12 -0400 Subject: [PATCH 1/4] Closes #16884: Remove ID column from ObjectChangeTable defaults --- netbox/core/tables/change_logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/core/tables/change_logging.py b/netbox/core/tables/change_logging.py index 423e459e5..aced0e8a6 100644 --- a/netbox/core/tables/change_logging.py +++ b/netbox/core/tables/change_logging.py @@ -48,6 +48,6 @@ class ObjectChangeTable(NetBoxTable): class Meta(NetBoxTable.Meta): model = ObjectChange fields = ( - 'pk', 'id', 'time', 'user_name', 'full_name', 'action', 'changed_object_type', 'object_repr', 'request_id', + 'pk', 'time', 'user_name', 'full_name', 'action', 'changed_object_type', 'object_repr', 'request_id', 'actions', ) From 1acb9902e773a8f93db086738f7d40fec938457d Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Fri, 19 Jul 2024 16:21:46 -0400 Subject: [PATCH 2/4] #16359: Include plugin nav content on mobile view --- netbox/templates/base/layout.html | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/netbox/templates/base/layout.html b/netbox/templates/base/layout.html index 9ab80e0c1..296c851eb 100644 --- a/netbox/templates/base/layout.html +++ b/netbox/templates/base/layout.html @@ -35,7 +35,8 @@ Blocks: {# User menu (mobile view) #} - diff --git a/netbox/utilities/testing/base.py b/netbox/utilities/testing/base.py index eb45aa784..cb69457a2 100644 --- a/netbox/utilities/testing/base.py +++ b/netbox/utilities/testing/base.py @@ -137,7 +137,10 @@ class ModelTestCase(TestCase): # Convert ArrayFields to CSV strings if type(field) is ArrayField: - if type(field.base_field) is ArrayField: + if getattr(field.base_field, 'choices', None): + # Values for fields with pre-defined choices can be returned as lists + model_dict[key] = value + elif type(field.base_field) is ArrayField: # Handle nested arrays (e.g. choice sets) model_dict[key] = '\n'.join([f'{k},{v}' for k, v in value]) elif issubclass(type(field.base_field), RangeField):