From bfd7881b7b4d408302c297d109c62616d595338c Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 10 Jul 2017 09:38:59 -0400 Subject: [PATCH 1/3] Fixes #1325: Retain interface attachment when editing a circuit termination --- netbox/circuits/forms.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/netbox/circuits/forms.py b/netbox/circuits/forms.py index 89f7a598f..f2371b262 100644 --- a/netbox/circuits/forms.py +++ b/netbox/circuits/forms.py @@ -252,6 +252,11 @@ class CircuitTerminationForm(BootstrapMixin, ChainedFieldsMixin, forms.ModelForm super(CircuitTerminationForm, self).__init__(*args, **kwargs) # Mark connected interfaces as disabled - self.fields['interface'].choices = [ - (iface.id, {'label': iface.name, 'disabled': iface.is_connected}) for iface in self.fields['interface'].queryset - ] + self.fields['interface'].choices = [] + for iface in self.fields['interface'].queryset: + self.fields['interface'].choices.append( + (iface.id, { + 'label': iface.name, + 'disabled': iface.is_connected and iface.pk != self.initial.get('interface'), + }) + ) From 41ea433e7c7c1fd9d86f397120462b39fef87ccc Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 10 Jul 2017 09:42:07 -0400 Subject: [PATCH 2/3] Release v2.0.9 --- netbox/netbox/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 55b26f31b..539f68015 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -13,7 +13,7 @@ except ImportError: ) -VERSION = '2.0.9-dev' +VERSION = '2.0.9' # Import required configuration parameters ALLOWED_HOSTS = DATABASE = SECRET_KEY = None From 5f66893038dc27550ef3ffe7ce9f2100b9162293 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Mon, 10 Jul 2017 09:44:34 -0400 Subject: [PATCH 3/3] Post-release version bump --- netbox/netbox/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 539f68015..8e6376677 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -13,7 +13,7 @@ except ImportError: ) -VERSION = '2.0.9' +VERSION = '2.0.10-dev' # Import required configuration parameters ALLOWED_HOSTS = DATABASE = SECRET_KEY = None