From d9a58e637699dcb1a25991a0b7cd86ded177cd44 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 3 Jun 2026 07:19:46 -0400 Subject: [PATCH] Fixes #22357: Remove unused `local_context_data` field from dcim.Module (#22364) --- .../0237_module_remove_local_context_data.py | 15 +++++++++++++++ netbox/dcim/models/modules.py | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 netbox/dcim/migrations/0237_module_remove_local_context_data.py diff --git a/netbox/dcim/migrations/0237_module_remove_local_context_data.py b/netbox/dcim/migrations/0237_module_remove_local_context_data.py new file mode 100644 index 000000000..34464ca27 --- /dev/null +++ b/netbox/dcim/migrations/0237_module_remove_local_context_data.py @@ -0,0 +1,15 @@ +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('dcim', '0236_moduletype_component_counts'), + ] + + operations = [ + migrations.RemoveField( + model_name='module', + name='local_context_data', + ), + ] diff --git a/netbox/dcim/models/modules.py b/netbox/dcim/models/modules.py index f52367c6d..5f37b7ee1 100644 --- a/netbox/dcim/models/modules.py +++ b/netbox/dcim/models/modules.py @@ -9,7 +9,7 @@ from mptt.models import MPTTModel from dcim.choices import * from dcim.utils import create_port_mappings, update_interface_bridges -from extras.models import ConfigContextModel, CustomField +from extras.models import CustomField from netbox.models import PrimaryModel from netbox.models.features import ImageAttachmentsMixin from netbox.models.mixins import WeightMixin @@ -240,7 +240,7 @@ class ModuleType(ImageAttachmentsMixin, PrimaryModel, WeightMixin): return yaml.dump(dict(data), sort_keys=False) -class Module(TrackingModelMixin, PrimaryModel, ConfigContextModel): +class Module(TrackingModelMixin, PrimaryModel): """ A Module represents a field-installable component within a Device which may itself hold multiple device components (for example, a line card within a chassis switch). Modules are instantiated from ModuleTypes.