Skip to content

Empty search entries are being created for device asset tags #15608

Closed
@jeremystretch

Description

@jeremystretch

Deployment Type

NetBox Cloud

NetBox Version

v3.7.4

Python Version

3.11

Steps to Reproduce

  1. Create a new device and note its database ID
  2. In the NetBox shell, inspect all search entries associated with it:
ct = ContentType.objects.get_for_model(Device)
device_id = 107
entries = CachedValue.objects.filter(object_type=ct, object_id=device_id)
for entry in entries:
    print(f'{entry.field}: {entry.value}')

Expected Behavior

Only fields which have a meaningful value set should have search entries created.

Observed Behavior

After creating a device with a description, I see three entries for it:

asset_tag: None
name: device1
description: asdasdasd

The value of asset_tag is null.

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

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions