Skip to content

Cannot sort Devices by device NAME #18845

@bobbwest

Description

@bobbwest

Deployment Type

Self-hosted

NetBox Version

v4.2.5

Python Version

3.12

Steps to Reproduce

On any netbox with one or more devices:

  1. Go to DEVICES > Devices
  2. Click the "NAME" column heading to sort by that field.

Expected Behavior

Devices to be sorted by name.

Observed Behavior

Nothing. Devices are not sorted by name.

This also happens on the Demo NetBox:

https://demo.netbox.dev/dcim/devices/?sort=name

In this case, when the sort field is specified on the command line, you get:

Server Error
There was a problem with your request. Please contact an administrator.

The complete exception is provided below:

<class 'django.core.exceptions.FieldError'>

Cannot resolve keyword 'label' into field. Choices are: airflow, asset_tag, bookmarks, cabletermination, cluster, cluster_id, comments, config_template, config_template_id, console_port_count, console_server_port_count, consoleports, consoleserverports, contacts, created, custom_field_data, description, device_bay_count, device_type, device_type_id, devicebays, face, front_port_count, frontports, id, images, interface_count, interfaces, inventory_item_count, inventoryitems, journal_entries, last_updated, latitude, local_context_data, location, location_id, longitude, module_bay_count, modulebays, modules, name, oob_ip, oob_ip_id, parent_bay, platform, platform_id, position, power_outlet_count, power_port_count, poweroutlets, powerports, primary_ip4, primary_ip4_id, primary_ip6, primary_ip6_id, rack, rack_id, rear_port_count, rearports, role, role_id, serial, services, site, site_id, status, subscriptions, tagged_items, tags, tenant, tenant_id, vc_master_for, vc_position, vc_priority, vdcs, virtual_chassis, virtual_chassis_id, virtual_machines

Python version: 3.12.9
NetBox version: 4.2.4
Plugins: 
  netbox_demo: 0.5.0

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions