From e78d921671295ad88a2043761a65e5ea99f8ada5 Mon Sep 17 00:00:00 2001 From: Louis Date: Fri, 10 Jul 2026 09:36:09 +0200 Subject: [PATCH] Fix endpoint form clean handling for NetBox 4.6 --- COMPATIBILITY.md | 1 + netbox_vmware_importer/__init__.py | 2 +- netbox_vmware_importer/forms.py | 6 +++--- pyproject.toml | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/COMPATIBILITY.md b/COMPATIBILITY.md index f2123ab..84070ec 100644 --- a/COMPATIBILITY.md +++ b/COMPATIBILITY.md @@ -6,3 +6,4 @@ | 0.1.1 | 4.4.0 | 4.5.x | | 0.1.2 | 4.4.0 | 4.5.x | | 0.1.3 | 4.4.0 | 4.5.x | +| 0.1.4 | 4.4.0 | 4.6.x | diff --git a/netbox_vmware_importer/__init__.py b/netbox_vmware_importer/__init__.py index 8820ff0..72e9d9d 100644 --- a/netbox_vmware_importer/__init__.py +++ b/netbox_vmware_importer/__init__.py @@ -5,7 +5,7 @@ class VMwareImporterConfig(PluginConfig): name = "netbox_vmware_importer" verbose_name = "VMware Importer" description = "Synchronize VMware vSphere virtual machines into NetBox." - version = "0.1.3" + version = "0.1.4" author = "Internal NetBox Team" base_url = "vmware-importer" min_version = "4.4.0" diff --git a/netbox_vmware_importer/forms.py b/netbox_vmware_importer/forms.py index b134a37..8a1df1d 100644 --- a/netbox_vmware_importer/forms.py +++ b/netbox_vmware_importer/forms.py @@ -83,13 +83,13 @@ class VCenterEndpointForm(NetBoxModelForm): ) def clean(self): - cleaned_data = super().clean() - password = cleaned_data.get("password") + super().clean() + password = self.cleaned_data.get("password") if not self.instance.pk and not password: raise ValidationError({"password": _("A password is required for new endpoints.")}) - return cleaned_data + return self.cleaned_data def save(self, commit=True): obj = super().save(commit=False) diff --git a/pyproject.toml b/pyproject.toml index 45916f5..0afee53 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "netbox-vmware-importer" -version = "0.1.3" +version = "0.1.4" description = "NetBox plugin to synchronize VMware vSphere virtual machines into NetBox." readme = "README.md" requires-python = ">=3.12"