From 1d033bd286f605dd4c500b3808cb496b347d4d3c Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Thu, 15 Sep 2022 16:08:43 -0400 Subject: [PATCH 1/5] Update lock threads action; lock closed PRs after 30 days --- .github/workflows/lock.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index b6073a71b..9df4bc441 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -9,13 +9,9 @@ jobs: lock: runs-on: ubuntu-latest steps: - - uses: dessant/lock-threads@v2 + - uses: dessant/lock-threads@v3 with: github-token: ${{ github.token }} - issue-lock-inactive-days: '90' - issue-exclude-created-before: '' - issue-exclude-labels: '' - issue-lock-labels: '' - issue-lock-comment: '' + issue-inactive-days: 90 + pr-inactive-days: 30 issue-lock-reason: 'resolved' - process-only: 'issues' From 59388d89a01d7070e2ccca1261f90ed4b6633e26 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 16 Sep 2022 08:20:24 -0400 Subject: [PATCH 2/5] Fixes #10387: Fix MultiValueDictKeyError exception when editing a device interface --- docs/release-notes/version-3.3.md | 4 ++++ netbox/dcim/forms/models.py | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index 14cbc74a3..8a6244744 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -2,6 +2,10 @@ ## v3.3.4 (FUTURE) +### Bug Fixes + +* [#10387](https://github.com/netbox-community/netbox/issues/10387) - Fix `MultiValueDictKeyError` exception when editing a device interface + --- ## v3.3.3 (2022-09-15) diff --git a/netbox/dcim/forms/models.py b/netbox/dcim/forms/models.py index 4fa27ae69..92545f294 100644 --- a/netbox/dcim/forms/models.py +++ b/netbox/dcim/forms/models.py @@ -1429,16 +1429,6 @@ class InterfaceForm(InterfaceCommonForm, ModularDeviceComponentForm): 'rf_channel_width': "Populated by selected channel (if set)", } - def __init__(self, *args, **kwargs): - super().__init__(*args, **kwargs) - - # Restrict LAG/bridge interface assignment by device/VC - device_id = self.data['device'] if self.is_bound else self.initial.get('device') - device = Device.objects.filter(pk=device_id).first() - if device and device.virtual_chassis and device.virtual_chassis.master: - self.fields['lag'].widget.add_query_param('device_id', device.virtual_chassis.master.pk) - self.fields['bridge'].widget.add_query_param('device_id', device.virtual_chassis.master.pk) - class FrontPortForm(ModularDeviceComponentForm): rear_port = DynamicModelChoiceField( From 4a9831bd23ad39329501306d5278c1b3e855cd07 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 16 Sep 2022 08:30:46 -0400 Subject: [PATCH 3/5] Fixes #10383: Fix assignment of component templates to module types via web UI --- docs/release-notes/version-3.3.md | 1 + netbox/dcim/forms/models.py | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index 8a6244744..2748f1edb 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -4,6 +4,7 @@ ### Bug Fixes +* [#10383](https://github.com/netbox-community/netbox/issues/10383) - Fix assignment of component templates to module types via web UI * [#10387](https://github.com/netbox-community/netbox/issues/10387) - Fix `MultiValueDictKeyError` exception when editing a device interface --- diff --git a/netbox/dcim/forms/models.py b/netbox/dcim/forms/models.py index 92545f294..5728e7f2d 100644 --- a/netbox/dcim/forms/models.py +++ b/netbox/dcim/forms/models.py @@ -1000,11 +1000,22 @@ class ComponentTemplateForm(BootstrapMixin, forms.ModelForm): class ModularComponentTemplateForm(ComponentTemplateForm): + device_type = DynamicModelChoiceField( + queryset=DeviceType.objects.all().all(), + required=False + ) module_type = DynamicModelChoiceField( queryset=ModuleType.objects.all(), required=False ) + def __init__(self, *args, **kwargs): + super().__init__(*args, **kwargs) + + # Disable reassignment of ModuleType when editing an existing instance + if self.instance.pk: + self.fields['module_type'].disabled = True + class ConsolePortTemplateForm(ModularComponentTemplateForm): fieldsets = ( From 30b9ddc251bdd3bbea895a811e0b533f8df9c55d Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 16 Sep 2022 13:14:14 -0400 Subject: [PATCH 4/5] Release v3.3.4 --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- docs/release-notes/version-3.3.md | 2 +- netbox/netbox/settings.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 9735da5b5..11b7e9aff 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -14,7 +14,7 @@ body: attributes: label: NetBox version description: What version of NetBox are you currently running? - placeholder: v3.3.3 + placeholder: v3.3.4 validations: required: true - type: dropdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 691e99cc6..bc00a3921 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -14,7 +14,7 @@ body: attributes: label: NetBox version description: What version of NetBox are you currently running? - placeholder: v3.3.3 + placeholder: v3.3.4 validations: required: true - type: dropdown diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index 2748f1edb..a51089c70 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -1,6 +1,6 @@ # NetBox v3.3 -## v3.3.4 (FUTURE) +## v3.3.4 (2022-09-16) ### Bug Fixes diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 41a6fd6db..e24ac6492 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -29,7 +29,7 @@ django.utils.encoding.force_text = force_str # Environment setup # -VERSION = '3.3.4-dev' +VERSION = '3.3.4' # Hostname HOSTNAME = platform.node() From 1b62c11db5c01c8dbc2c2ddf2f2bd18ddd6a9098 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 16 Sep 2022 13:41:09 -0400 Subject: [PATCH 5/5] PRVB --- docs/release-notes/version-3.3.md | 4 ++++ netbox/netbox/settings.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index a51089c70..d779e1a93 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -1,5 +1,9 @@ # NetBox v3.3 +## v3.3.5 (FUTURE) + +--- + ## v3.3.4 (2022-09-16) ### Bug Fixes diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index e24ac6492..cfd4d231c 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -29,7 +29,7 @@ django.utils.encoding.force_text = force_str # Environment setup # -VERSION = '3.3.4' +VERSION = '3.3.5-dev' # Hostname HOSTNAME = platform.node()