diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c34f7e..1ed91e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixed * Make the required single platform destination explicit when creating an installation +* Fix installation form submission on NetBox v4.6.5 when form mixins return no cleaned-data value ### Added diff --git a/README.md b/README.md index 26b7157..2481d4b 100644 --- a/README.md +++ b/README.md @@ -63,7 +63,7 @@ Die installierte Version kann anschließend geprüft werden: /opt/netbox/venv/bin/pip show netbox-slm ``` -Für diese Variante muss dort mindestens Version `1.11.1` stehen. +Für diese Variante muss dort mindestens Version `1.11.2` stehen. ### 3. Plugin in NetBox aktivieren diff --git a/netbox_slm/__init__.py b/netbox_slm/__init__.py index dae1884..b498ee9 100644 --- a/netbox_slm/__init__.py +++ b/netbox_slm/__init__.py @@ -17,7 +17,7 @@ limitations under the License. from netbox.plugins import PluginConfig from django.utils.translation import gettext_lazy as _ -__version__ = "1.11.1" +__version__ = "1.11.2" class SLMConfig(PluginConfig): diff --git a/netbox_slm/forms/software_product_installation.py b/netbox_slm/forms/software_product_installation.py index ebed762..5cf8ad3 100644 --- a/netbox_slm/forms/software_product_installation.py +++ b/netbox_slm/forms/software_product_installation.py @@ -75,15 +75,15 @@ class SoftwareProductInstallationForm(NetBoxModelForm): return version def clean(self): - cleaned_data = super().clean() + super().clean() destinations = [ - cleaned_data.get("device"), - cleaned_data.get("virtualmachine"), - cleaned_data.get("cluster"), + self.cleaned_data.get("device"), + self.cleaned_data.get("virtualmachine"), + self.cleaned_data.get("cluster"), ] if sum(destination is not None for destination in destinations) != 1: raise ValidationError(_("Select exactly one platform destination: device, virtual machine, or cluster.")) - return cleaned_data + return self.cleaned_data class SoftwareProductInstallationFilterForm(NetBoxModelFilterSetForm):