Skip to content

Commit 46b933a

Browse files
Merge pull request #14616 from netbox-community/develop
Release v3.6.8
2 parents f1d4011 + 07da3f6 commit 46b933a

File tree

36 files changed

+523
-64
lines changed

36 files changed

+523
-64
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ body:
2323
attributes:
2424
label: NetBox Version
2525
description: What version of NetBox are you currently running?
26-
placeholder: v3.6.7
26+
placeholder: v3.6.8
2727
validations:
2828
required: true
2929
- type: dropdown

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
attributes:
1515
label: NetBox version
1616
description: What version of NetBox are you currently running?
17-
placeholder: v3.6.7
17+
placeholder: v3.6.8
1818
validations:
1919
required: true
2020
- type: dropdown

docs/features/search.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ When entering a search query, the user can choose a specific lookup type: exact
88

99
Custom fields defined by NetBox administrators are also included in search results if configured with a search weight. Additionally, NetBox plugins can register their own custom models for inclusion alongside core models.
1010

11+
!!! note
12+
NetBox does not index any static choice field's (including custom fields of type "Selection" or "Multiple selection").
13+
1114
## Saved Filters
1215

1316
Each type of object in NetBox is accompanied by an extensive set of filters, each tied to a specific attribute, which enable the creation of complex queries. Often you'll find that certain queries are used routinely to apply some set of prescribed conditions to a query. Once a set of filters has been applied, NetBox offers the option to save it for future use.

docs/models/dcim/inventoryitem.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The parent inventory item to which this item is assigned (optional).
1919

2020
### Name
2121

22-
The inventory item's name. Must be unique to the parent device.
22+
The inventory item's name. If the inventory item is assigned to a parent item, its name must be unique among its siblings (all items belonging to the same parent item).
2323

2424
### Label
2525

docs/release-notes/version-3.6.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# NetBox v3.6
22

3+
## v3.6.8 (2023-12-27)
4+
5+
### Enhancements
6+
7+
* [#11039](https://github.com/netbox-community/netbox/issues/11039) - List parent prefixes under IP range view
8+
* [#14507](https://github.com/netbox-community/netbox/issues/14507) - Print new NetBox version when running upgrade script
9+
* [#14538](https://github.com/netbox-community/netbox/issues/14538) - Add the `available_at_site` filter for VLANs
10+
* [#14596](https://github.com/netbox-community/netbox/issues/14596) - Match against description field when searching for devices
11+
12+
### Bug Fixes
13+
14+
* [#11816](https://github.com/netbox-community/netbox/issues/11816) - Correct display of error message when attempting invalid VLAN site & group assignment
15+
* [#12731](https://github.com/netbox-community/netbox/issues/12731) - Fix custom validation for many-to-many fields
16+
* [#13606](https://github.com/netbox-community/netbox/issues/13606) - Fix filtering custom multi-choice fields by null
17+
* [#13649](https://github.com/netbox-community/netbox/issues/13649) - Correct calculation of absolute lengths for zero-length cables
18+
* [#13812](https://github.com/netbox-community/netbox/issues/13812) - Update status of remote data source when syncing fails via `syncdatasource` management command
19+
* [#13909](https://github.com/netbox-community/netbox/issues/13909) - Fix cloning of objects which have a multi-choice custom field
20+
* [#14517](https://github.com/netbox-community/netbox/issues/14517) - Ensure reservations tab is always displayed under rack view
21+
* [#14532](https://github.com/netbox-community/netbox/issues/14532) - Device/VM change record should accurately reflect when primary/OOB IP is deleted
22+
* [#14549](https://github.com/netbox-community/netbox/issues/14549) - Fix association of job results when executing scripts via `runscript` management command
23+
* [#14560](https://github.com/netbox-community/netbox/issues/14560) - Do not escape exclamation marks in custom link URLs
24+
* [#14575](https://github.com/netbox-community/netbox/issues/14575) - Fix display of the tags column under VDC table
25+
* [#14613](https://github.com/netbox-community/netbox/issues/14613) - Fix display of current configuration parameters in UI
26+
27+
---
28+
329
## v3.6.7 (2023-12-15)
430

531
### Enhancements

netbox/core/management/commands/syncdatasource.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from django.core.management.base import BaseCommand, CommandError
22

3+
from core.choices import DataSourceStatusChoices
34
from core.models import DataSource
45

56

@@ -33,9 +34,13 @@ def handle(self, *args, **options):
3334
for i, datasource in enumerate(datasources, start=1):
3435
self.stdout.write(f"[{i}] Syncing {datasource}... ", ending='')
3536
self.stdout.flush()
36-
datasource.sync()
37-
self.stdout.write(datasource.get_status_display())
38-
self.stdout.flush()
37+
try:
38+
datasource.sync()
39+
self.stdout.write(datasource.get_status_display())
40+
self.stdout.flush()
41+
except Exception as e:
42+
DataSource.objects.filter(pk=datasource.pk).update(status=DataSourceStatusChoices.FAILED)
43+
raise e
3944

4045
if len(options['name']) > 1:
4146
self.stdout.write(f"Finished.")

netbox/core/views.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from django.contrib import messages
2+
from django.core.cache import cache
23
from django.shortcuts import get_object_or_404, redirect
34

45
from extras.models import ConfigRevision
@@ -153,9 +154,11 @@ class ConfigView(generic.ObjectView):
153154
queryset = ConfigRevision.objects.all()
154155

155156
def get_object(self, **kwargs):
156-
if config := self.queryset.first():
157-
return config
158-
# Instantiate a dummy default config if none has been created yet
159-
return ConfigRevision(
160-
data=get_config().defaults
161-
)
157+
revision_id = cache.get('config_version')
158+
try:
159+
return ConfigRevision.objects.get(pk=revision_id)
160+
except ConfigRevision.DoesNotExist:
161+
# Fall back to using the active config data if no record is found
162+
return ConfigRevision(
163+
data=get_config()
164+
)

netbox/dcim/filtersets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,6 +1018,7 @@ def search(self, queryset, name, value):
10181018
Q(serial__icontains=value.strip()) |
10191019
Q(inventoryitems__serial__icontains=value.strip()) |
10201020
Q(asset_tag__icontains=value.strip()) |
1021+
Q(description_icontains=value.strip()) |
10211022
Q(comments__icontains=value) |
10221023
Q(primary_ip4__address__startswith=value) |
10231024
Q(primary_ip6__address__startswith=value)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from django.db import migrations
2+
3+
4+
def update_cable_lengths(apps, schema_editor):
5+
Cable = apps.get_model('dcim', 'Cable')
6+
7+
# Set the absolute length for any zero-length Cables
8+
Cable.objects.filter(length=0).update(_abs_length=0)
9+
10+
11+
class Migration(migrations.Migration):
12+
13+
dependencies = [
14+
('dcim', '0181_rename_device_role_device_role'),
15+
]
16+
17+
operations = [
18+
migrations.RunPython(
19+
code=update_cable_lengths,
20+
reverse_code=migrations.RunPython.noop
21+
),
22+
]

netbox/dcim/models/cables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ def save(self, *args, **kwargs):
201201
_created = self.pk is None
202202

203203
# Store the given length (if any) in meters for use in database ordering
204-
if self.length and self.length_unit:
204+
if self.length is not None and self.length_unit:
205205
self._abs_length = to_meters(self.length, self.length_unit)
206206
else:
207207
self._abs_length = None

0 commit comments

Comments
 (0)